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

ContextWindowExceededError #1712

Open
TSJasonH opened this issue Feb 4, 2025 · 2 comments
Open

ContextWindowExceededError #1712

TSJasonH opened this issue Feb 4, 2025 · 2 comments

Comments

@TSJasonH
Copy link

TSJasonH commented Feb 4, 2025

Feel free to mark this as a duplicate in the case that it's already being/been handled in #49 or #278

I hit the below error with freshly installed skyvern running in docker v0.1.54 and GPT4o

Prompt:

Open images.google.com and search for pictures of parades. Click on an image that contains balloons.

skyvern-1     | litellm.exceptions.ContextWindowExceededError: litellm.ContextWindowExceededError: litellm.BadRequestError: ContextWindowExceededError: OpenAIException - Error code: 400 - {'error': {'message': "This model's maximum context length is 128000 tokens. However, you requested 128191 tokens (111807 in the messages, 16384 in the completion). Please reduce the length ofthe messages or completion.", 'type': 'invalid_request_error', 'param': 'messages', 'code': 'context_length_exceeded'}}
skyvern-1     | 2025-02-03T23:49:20.544718Z [error    ] Unexpected exception in agent_step, marking step as failed step_id=stp_356238418793460668 step_order=1 step_retry=3 task_id=tsk_356235429496222434

Thanks for the awesome project!

@wintonzheng
Copy link
Contributor

@TSJasonH

some websites have large amount of content which leads to this error.

if you could share the website and your prompt, I can see if there's improvement we can make to reduce the token size.

@TSJasonH
Copy link
Author

Of course, the prompt was lofty anyway. It was:

"Open images.google.com and search for pictures of parades. Click on an image that contains balloons. "

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