Open Copilotes opened 3 hours ago
The character limit for custom disclaimers in the Dify backend is set to 255 characters, as defined in the migration script api/migrations/versions/5fda94355fce_custom_disclaimer.py
[1]. If you're encountering an error when the disclaimer exceeds 64 characters, it might be due to a discrepancy between the frontend validation and the backend limit.
To resolve this, you could check if there's any frontend validation restricting the input to 64 characters and adjust it to match the backend limit of 255 characters. Alternatively, if the backend is incorrectly enforcing a 64-character limit, you might need to investigate further into the backend code to ensure it aligns with the defined 255-character limit.
To continue talking to Dosu, mention @dosu.
Self Checks
Dify version
0.10.1
Cloud or Self Hosted
Cloud, Self Hosted (Docker)
Steps to reproduce
When setting a custom disclaimer for an application, an error will be reported if the length exceeds 64 characters (chinese character, maybe 128 in english)
✔️ Expected Behavior
Either limit the input to 64 characters in length on the frontend, or lift the limit on the backend to allow for longer disclaimer entries
❌ Actual Behavior
Error raise: Internal Server Error