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
When a user asks a question that generates a response exceeding Discord's 4000-character limit, the bot encounters the following error:
DiscordAPIError[50035]: Invalid Form Body
content[BASE_TYPE_MAX_LENGTH]: Must be 4000 or fewer in length.
Steps to Reproduce
Ask a question (e.g "what number of drugs are out there") in the Discord server that prompts the bot to generate a 4000+ char response.
Observe the bot failing to send the response and the error being logged.
Expected Behavior
It shouldn't get responses this long in the first place probably, but if it does, it should send in multiple messages (max 2) or end it off with 3 dots instead of an error. It should also not cause the user to get endlessly stuck no matter what they say.
Actual Behavior
The bot fails to send the response due to exceeding Discord's character limit, resulting in the above error. It also seems to interfere with future messages due to history so all future messages meet the same fate.
Suggested potential Fix(s)
Worst: Implement logic to split long messages into multiple parts and send them sequentially.
Second best: truncate the response.
Best: prevent GPT from sending responses this long at all.
Additional Context
Error reported by .•777•.ÒwÓ• / cyp888. on Discord.
This issue may affect other users if questions result in lengthy answers.
Environment
Bot: [g.ai]
API: Discord
Error ID: 50035
The text was updated successfully, but these errors were encountered:
Description
When a user asks a question that generates a response exceeding Discord's 4000-character limit, the bot encounters the following error:
DiscordAPIError[50035]: Invalid Form Body
content[BASE_TYPE_MAX_LENGTH]: Must be 4000 or fewer in length.
Steps to Reproduce
Expected Behavior
It shouldn't get responses this long in the first place probably, but if it does, it should send in multiple messages (max 2) or end it off with 3 dots instead of an error. It should also not cause the user to get endlessly stuck no matter what they say.
Actual Behavior
The bot fails to send the response due to exceeding Discord's character limit, resulting in the above error. It also seems to interfere with future messages due to history so all future messages meet the same fate.
Suggested potential Fix(s)
Additional Context
Error reported by
.•777•.ÒwÓ• / cyp888.
on Discord.This issue may affect other users if questions result in lengthy answers.
Environment
The text was updated successfully, but these errors were encountered: