-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
An error "context length exceeded" occurred during the conversation. #8360
Comments
Hello, @StantonStetler! I'm Dosu, a bot here to help you with bug reports, questions, and contributions. I'll assist you while we wait for a human maintainer. I found some similar issues and discussions that might help resolve the "context length exceeded" error in your self-hosted Dify version 0.8.0:
To resolve the "context length exceeded" error, you can lower the value of "Max token" in the parameter settings of the Prompt Eng. Reducing the "Max token" value will help manage the context length within the acceptable range. For example, setting Additionally, the By adjusting these settings, you should be able to avoid the "context length exceeded" error and ensure a smoother conversation flow. |
Try to adjust the max_tokens to a smaller one. |
The current max_token is the default 512, which is not very large, and in some cases, the length exceeds the limit. May I ask if this is due to the code? If so, which class should be modified? |
Then I think the prompt is too long. \
|
Self Checks
Dify version
0.8.0
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
Create agent
Configure knowledge base
Debug dialogue chat on input box page
Error appears at the top of the page
✔️ Expected Behavior
Normal conversation
❌ Actual Behavior
Error occurred and no response
The text was updated successfully, but these errors were encountered: