Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

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

Open
krim404 opened this issue Mar 14, 2024 · 1 comment
Open

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

krim404 opened this issue Mar 14, 2024 · 1 comment

Comments

@krim404
Copy link

krim404 commented Mar 14, 2024

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
Copy link

Same issue. I have no idea sadly :/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants