whatsapp-chatgpt
whatsapp-chatgpt copied to clipboard
Open AI error after logging into the whatsapp
Getting openai error:
An error occured, please contact the administrator. (OpenAI error 400: {
"error": {
"message": "This model's maximum context length is 4097 tokens. However, you requested 4147 tokens (51 in the messages, 4096 in the completion). Please reduce the length of the messages or completion.",
"type": "invalid_request_error",
"param": "messages",
"code": "context_length_exceeded"
}
}
)
Same here... tried changing the model to gpt-4 but that didn't fix the problem.
I got to make it work by changing the token limit in the config file from 4096 to maybe 7000 and changing the model to gpt-4 as well!
Also try this fix in env
file:
# In case you run into ratelimit on a single organization token, you might setting up multiple API keys here
# Example:
# OPENAI_API_KEYS=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks @Isaakkamau , it's working now :)