Zero6992 / chatGPT-discord-bot

Integrate ChatGPT into your own discord bot
GNU General Public License v2.0
2.6k stars 699 forks source link

AI cannot remember the context. #384

Closed sslisen closed 4 months ago

sslisen commented 1 year ago

After I deployed the AI on the first day, everything worked fine during the test. It was able to remember the context and connect it to answer questions. However, in the past few days, it suddenly started throwing errors. The AI couldn't remember the context and didn't even know the previous information when answering questions. When I checked the running code, it showed an error message:

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

Traceback (most recent call last):
  File "E:\PycharmProjects\PythonProject\chatGPT-discord-bot-1.3.3\venv\lib\site-packages\discord\app_commands\tree.py", line 1248, in _call
    await command._invoke_with_namespace(interaction, namespace)
  File "E:\PycharmProjects\PythonProject\chatGPT-discord-bot-1.3.3\venv\lib\site-packages\discord\app_commands\commands.py", line 867, in _invoke_with_namespace
    return await self._do_call(interaction, transformed_values)
  File "E:\PycharmProjects\PythonProject\chatGPT-discord-bot-1.3.3\venv\lib\site-packages\discord\app_commands\commands.py", line 860, in _do_call
    raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'chat' raised an exception: HTTPException: 400 Bad Request (error code: 40060): Interaction has already been acknowledged.

. What could be the problem and how can I adjust it? I am using PyCharm for local running, with Windows 10 system and Python version 3.10.

Zero6992 commented 1 year ago

Check if you have two instances of your bot running simultaneously

Zero6992 commented 1 year ago

You can open a new bot test if it still happens

sslisen commented 1 year ago

I quit PyCharm and restarted my computer, then ran the code again in PyCharm, but it still come with same error.