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

Gemini-pro from openrouter have context length of 91k but getting error #34

Open
upasana-mittal opened this issue Jul 25, 2024 · 1 comment

Comments

@upasana-mittal
Copy link

openai.BadRequestError: Error code: 400 - {'error': {'message': "This model's maximum context length is 8192 tokens, however you requested 8977 tokens (8977 in your prompt; 0 for the completion). Please reduce your prompt; or completion length.", 'type': 'invalid_request_error', 'param': None, 'code': None}}

I am using routellm _ openrouter and this is the error I am getting when using google's gemini pro

@iojw
Copy link
Collaborator

iojw commented Jul 28, 2024

Hi there! So this is caused by the OpenAI embedding call, which unfortunately has a maximum context length - I would suggest using the bert model instead, which doesn't require an embedding call.

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

2 participants