xNul / chat-llama-discord-bot

A Discord Bot for chatting with LLaMA, Vicuna, Alpaca, MPT, or any other Large Language Model (LLM) supported by text-generation-webui or llama.cpp.
https://discord.gg/TcRGDV754Y
MIT License
118 stars 23 forks source link

Still hitting 1024 limits #6

Closed keninishna closed 1 year ago

keninishna commented 1 year ago

The bot is still hitting the text limits, granted I upped max tokens to 400

Traceback (most recent call last): File "/home/user/miniconda3/envs/textgen/lib/python3.10/site-packages/discord/app_commands/commands.py", line 842, in _do_call return await self._callback(interaction, **params) # type: ignore File "/home/user/text-generation-webui/bot.py", line 179, in reply await ll_gen(ctx, queues) File "/home/user/text-generation-webui/bot.py", line 124, in ll_gen await msg.edit(embed=replyembed) File "/home/user/miniconda3/envs/textgen/lib/python3.10/site-packages/discord/webhook/async.py", line 841, in edit return await self._state._webhook.editmessage( File "/home/user/miniconda3/envs/textgen/lib/python3.10/site-packages/discord/webhook/async.py", line 1974, in edit_message data = await adapter.edit_webhookmessage( File "/home/user/miniconda3/envs/textgen/lib/python3.10/site-packages/discord/webhook/async.py", line 221, in request raise HTTPException(response, data) discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body In embeds.0.fields.1.value: Must be 1024 or fewer in length.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/user/miniconda3/envs/textgen/lib/python3.10/site-packages/discord/ext/commands/hybrid.py", line 438, in _invoke_with_namespace value = await self._do_call(ctx, ctx.kwargs) # type: ignore File "/home/user/miniconda3/envs/textgen/lib/python3.10/site-packages/discord/app_commands/commands.py", line 860, in _do_call raise CommandInvokeError(self, e) from e discord.app_commands.errors.CommandInvokeError: Command 'reply' raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body In embeds.0.fields.1.value: Must be 1024 or fewer in length.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/user/miniconda3/envs/textgen/lib/python3.10/site-packages/discord/ext/commands/hybrid.py", line 438, in _invoke_with_namespace value = await self._do_call(ctx, ctx.kwargs) # type: ignore File "/home/user/miniconda3/envs/textgen/lib/python3.10/site-packages/discord/app_commands/commands.py", line 860, in _do_call raise CommandInvokeError(self, e) from e discord.ext.commands.errors.HybridCommandError: Hybrid command raised an error: Command 'reply' raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body In embeds.0.fields.1.value: Must be 1024 or fewer in length.

xNul commented 1 year ago

I believe I just fixed this with my latest commit. Please let me know if it happens again. For some reason, I'm not able to reproduce on my end.