toeverything / AFFiNE

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
https://affine.pro
Other
42.18k stars 2.75k forks source link

​Using OpenAI ChatGPT #8674

Open dwulfing opened 1 week ago

dwulfing commented 1 week ago

What happened?

I have add the env Value "COPILOT_OPENAI_API_KEY=sk-svcacct-Q..." to activate Affine AI on my Self Hosted Docker instance.

I gat this errors: GraphQLError: Unknown type "QueryChatHistoriesInput". at Object.NamedType (/app/node_modules/graphql/validation/rules/KnownTypeNamesRule.js:65:11) at Object.enter (/app/node_modules/graphql/language/visitor.js:301:32) at Object.enter (/app/node_modules/graphql/utilities/TypeInfo.js:391:27) at visit (/app/node_modules/graphql/language/visitor.js:197:21) at validate (/app/node_modules/graphql/validation/validate.js:91:24) at processGraphQLRequest (/app/node_modules/@apollo/server/dist/cjs/requestPipeline.js:101:61) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async internalExecuteOperation (/app/node_modules/@apollo/server/dist/cjs/ApolloServer.js:644:16) at async runHttpQuery (/app/node_modules/@apollo/server/dist/cjs/runHttpQuery.js:135:29) at async runPotentiallyBatchedHttpQuery (/app/node_modules/@apollo/server/dist/cjs/httpBatching.js:37:16)

and some more...

Distribution version

Web (app.affine.pro)

What browsers are you seeing the problem on if you're using web version?

Chrome

Are you self-hosting?

Relevant log output

at async runPotentiallyBatchedHttpQuery (/app/node_modules/@apollo/server/dist/cjs/httpBatching.js:37:16)
[Nest] 117  - 11/03/2024, 9:24:43 PM   ERROR [GraphQL] Internal server error
GraphQLError: Unknown type "CreateChatSessionInput". Did you mean "CreateUserInput"?
    at Object.NamedType (/app/node_modules/graphql/validation/rules/KnownTypeNamesRule.js:65:11)
    at Object.enter (/app/node_modules/graphql/language/visitor.js:301:32)
    at Object.enter (/app/node_modules/graphql/utilities/TypeInfo.js:391:27)
    at visit (/app/node_modules/graphql/language/visitor.js:197:21)
    at validate (/app/node_modules/graphql/validation/validate.js:91:24)
    at processGraphQLRequest (/app/node_modules/@apollo/server/dist/cjs/requestPipeline.js:101:61)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async internalExecuteOperation (/app/node_modules/@apollo/server/dist/cjs/ApolloServer.js:644:16)
    at async runHttpQuery (/app/node_modules/@apollo/server/dist/cjs/runHttpQuery.js:135:29)
    at async runPotentiallyBatchedHttpQuery (/app/node_modules/@apollo/server/dist/cjs/httpBatching.js:37:16)
[Nest] 117  - 11/03/2024, 9:24:43 PM   ERROR [GraphQL] Internal server error
GraphQLError: Cannot query field "createCopilotSession" on type "Mutation".
    at Object.Field (/app/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.js:51:13)
    at Object.enter (/app/node_modules/graphql/language/visitor.js:301:32)
    at Object.enter (/app/node_modules/graphql/utilities/TypeInfo.js:391:27)
    at visit (/app/node_modules/graphql/language/visitor.js:197:21)
    at validate (/app/node_modules/graphql/validation/validate.js:91:24)
    at processGraphQLRequest (/app/node_modules/@apollo/server/dist/cjs/requestPipeline.js:101:61)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async internalExecuteOperation (/app/node_modules/@apollo/server/dist/cjs/ApolloServer.js:644:16)
    at async runHttpQuery (/app/node_modules/@apollo/server/dist/cjs/runHttpQuery.js:135:29)
    at async runPotentiallyBatchedHttpQuery (/app/node_modules/@apollo/server/dist/cjs/httpBatching.js:37:16)

Anything else?

No response

beanaroo commented 3 days ago

I am also experiencing these errors. Perhaps due to version inconsistency? (I'm using the latest compose.yaml)

image

[Nest] 125  - 11/10/2024, 2:25:21 AM   ERROR [GraphQL] Internal server error
GraphQLError: Unknown type "QueryChatHistoriesInput".
    at Object.NamedType (/app/node_modules/graphql/validation/rules/KnownTypeNamesRule.js:65:11)
    at Object.enter (/app/node_modules/graphql/language/visitor.js:301:32)
    at Object.enter (/app/node_modules/graphql/utilities/TypeInfo.js:391:27)
    at visit (/app/node_modules/graphql/language/visitor.js:197:21)
    at validate (/app/node_modules/graphql/validation/validate.js:91:24)
    at processGraphQLRequest (/app/node_modules/@apollo/server/dist/cjs/requestPipeline.js:101:61)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async internalExecuteOperation (/app/node_modules/@apollo/server/dist/cjs/ApolloServer.js:644:16)
    at async runHttpQuery (/app/node_modules/@apollo/server/dist/cjs/runHttpQuery.js:135:29)
    at async runPotentiallyBatchedHttpQuery (/app/node_modules/@apollo/server/dist/cjs/httpBatching.js:37:16)

[Nest] 125  - 11/10/2024, 2:25:21 AM   ERROR [GraphQL] Internal server error
GraphQLError: Cannot query field "copilot" on type "UserType".
    at Object.Field (/app/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.js:51:13)
    at Object.enter (/app/node_modules/graphql/language/visitor.js:301:32)
    at Object.enter (/app/node_modules/graphql/utilities/TypeInfo.js:391:27)
    at visit (/app/node_modules/graphql/language/visitor.js:197:21)
    at validate (/app/node_modules/graphql/validation/validate.js:91:24)
    at processGraphQLRequest (/app/node_modules/@apollo/server/dist/cjs/requestPipeline.js:101:61)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async internalExecuteOperation (/app/node_modules/@apollo/server/dist/cjs/ApolloServer.js:644:16)
    at async runHttpQuery (/app/node_modules/@apollo/server/dist/cjs/runHttpQuery.js:135:29)
    at async runPotentiallyBatchedHttpQuery (/app/node_modules/@apollo/server/dist/cjs/httpBatching.js:37:16)

[Nest] 125  - 11/10/2024, 2:25:21 AM   ERROR [GraphQL] Internal server error
GraphQLError: Unknown type "QueryChatHistoriesInput".
    at Object.NamedType (/app/node_modules/graphql/validation/rules/KnownTypeNamesRule.js:65:11)
    at Object.enter (/app/node_modules/graphql/language/visitor.js:301:32)
    at Object.enter (/app/node_modules/graphql/utilities/TypeInfo.js:391:27)
    at visit (/app/node_modules/graphql/language/visitor.js:197:21)
    at validate (/app/node_modules/graphql/validation/validate.js:91:24)
    at processGraphQLRequest (/app/node_modules/@apollo/server/dist/cjs/requestPipeline.js:101:61)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async internalExecuteOperation (/app/node_modules/@apollo/server/dist/cjs/ApolloServer.js:644:16)
    at async runHttpQuery (/app/node_modules/@apollo/server/dist/cjs/runHttpQuery.js:135:29)
    at async runPotentiallyBatchedHttpQuery (/app/node_modules/@apollo/server/dist/cjs/httpBatching.js:37:16)