You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
[FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
Please do not modify this template :) and fill in all the required fields.
Dify version
0.71
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Initialize a conversation session using the Dify framework.
Conduct a series of consecutive question-answer interactions, ensuring that the cumulative text exceeds 6000 characters.
✔️ Expected Behavior
The framework should handle or truncate the input to comply with the model's limitations without causing a server error, allowing the conversation to proceed smoothly.
❌ Actual Behavior
An error is thrown, indicating that the input length has exceeded the acceptable range, resulting in a failed model invocation.
The text was updated successfully, but these errors were encountered:
@BingFrost Hello there! I'm here to help you with any bugs, questions, or contributions you have for the Dify framework. Just let me know how I can assist you while you wait for a human maintainer.
To resolve the error in the Dify Framework with the Qwen Model where the session exceeds the input length limit, you can follow these steps:
Reduce the Prefix Prompt: Shorten the initial text or instructions provided to the model.
Shrink the Max Token: Decrease the maximum number of tokens the model is allowed to generate. The default maximum is 512 tokens, but you can adjust this value within the range of 1 to 4096 tokens.
Switch to a Model with a Larger Token Limit: If reducing the prefix prompt and shrinking the max token are not sufficient, consider switching to a language model with a larger token limit size. The Qwen2-72B-Instruct model has a context size of 32768 tokens, which is quite large [2][3][4][5][6].
By adjusting these parameters, you can ensure that the input length stays within the model's acceptable range, thus preventing the error.
Self Checks
Dify version
0.71
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Initialize a conversation session using the Dify framework.
Conduct a series of consecutive question-answer interactions, ensuring that the cumulative text exceeds 6000 characters.
✔️ Expected Behavior
The framework should handle or truncate the input to comply with the model's limitations without causing a server error, allowing the conversation to proceed smoothly.
❌ Actual Behavior
An error is thrown, indicating that the input length has exceeded the acceptable range, resulting in a failed model invocation.
The text was updated successfully, but these errors were encountered: