matrixgpt / matrix-chatgpt-bot

Talk to ChatGPT via any Matrix client!
GNU Affero General Public License v3.0
230 stars 64 forks source link

API error (missing 1 required keyword-only argument messages) #287

Open krim404 opened 3 months ago

krim404 commented 3 months ago

I'm using a proxy which implements the current active, official API (https://platform.openai.com/docs/api-reference/chat). Sadly it seems like the dependency used in this bot (waylaidwanderer/chatgpt-api) is not maintained anymore and uses a different approach to talk to the api.

I only get the following error when using the bot:

Thu, 14 Mar 2024 13:16:38 GMT [ERROR] [OpenAI-API Error: Error: Failed to send message. HTTP 400 - {"error":{"message":"[\"At body: ApiChatCompletionsRequest.init() missing 1 required keyword-only argument: 'messages'\"]","type":"bad_request","code":400}}] TypeError: Cannot read properties of undefined (reading 'response') at CommandHandler.onMessage (file:///usr/src/app/dist/handlers.js:132:86) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

is there any workaround for that?

dillfrescott commented 1 month ago

Same issue. I have no idea sadly :/