Closed ImShEthan closed 1 year ago
我也是这个问题
same
exact same here, worked for a little while and then all of a sudden stopped working.
ChatGPTBot: [2023-05-15 10:59:58] [ERROR ] discord.client: Ignoring exception in on_message Traceback (most recent call last): File "C:\Users\ImN3k\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\client.py", line 441, in _run_event await coro(*args, **kwargs) File "C:\Users\ImN3k\Documents\GitHub\Discord-Chatbot-Gpt4Free\main.py", line 143, in on_message response = await generate_response(prompt) File "C:\Users\ImN3k\Documents\GitHub\Discord-Chatbot-Gpt4Free\main.py", line 39, in generate_response response = usesless.Completion.create(prompt=prompt, parentMessageId=message_id) File "C:\Users\ImN3k\Documents\GitHub\Discord-Chatbot-Gpt4Free\usesless__init.py", line 47, in create response = Completion.response_to_json(content) File "C:\Users\ImN3k\Documents\GitHub\Discord-Chatbot-Gpt4Free\usesless__init.py", line 54, in response_to_json split_text = text.rsplit("\n", 1)[1] IndexError: list index out of range
The api url used in the init "https://ai.usesless.com/api/chat-process" is not working anymore "Cannot GET /api/chat-process"
fixed 修复
Hello looks like the api in the "usesless" module is not working now Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/discord/client.py", line 441, in _run_event await coro(*args, **kwargs) File "/home/ethan/Discord-Chatbot-Gpt4Free/main.py", line 143, in on_message response = await generate_response(prompt) File "/home/ethan/Discord-Chatbot-Gpt4Free/main.py", line 39, in generate_response response = usesless.Completion.create(prompt=prompt, parentMessageId=message_id) File "/home/ethan/Discord-Chatbot-Gpt4Free/usesless/init.py", line 47, in create response = Completion.response_to_json(content) File "/home/ethan/Discord-Chatbot-Gpt4Free/usesless/init.py", line 54, in response_to_json split_text = text.rsplit("\n", 1)[1] IndexError: list index out of range Got this error and the url in the init is not working anymore