Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open AI error after logging into the whatsapp #303

Open
RadientBrain opened this issue Oct 1, 2023 · 4 comments
Open

Open AI error after logging into the whatsapp #303

RadientBrain opened this issue Oct 1, 2023 · 4 comments

Comments

@RadientBrain
Copy link

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"
  }
}
)
@moeliciouz
Copy link

moeliciouz commented Oct 2, 2023

Same here... tried changing the model to gpt-4 but that didn't fix the problem.

@RadientBrain
Copy link
Author

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!

@Isaakkamau
Copy link

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

@moeliciouz
Copy link

moeliciouz commented Oct 2, 2023

Thanks @Isaakkamau , it's working now :)

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

No branches or pull requests

3 participants