mishl-dev / Discord-AI-Chatbot

This Discord chatbot is incredibly versatile. Powered incredibly fast Groq API
GNU Affero General Public License v3.0
1.32k stars 417 forks source link

Api change #67

Closed ImShEthan closed 1 year ago

ImShEthan commented 1 year ago

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

qes152408 commented 1 year ago

我也是这个问题

Pigman-manga commented 1 year ago

same

ImN3k0 commented 1 year ago

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

ImShEthan commented 1 year ago

The api url used in the init "https://ai.usesless.com/api/chat-process" is not working anymore "Cannot GET /api/chat-process"

mishl-dev commented 1 year ago

fixed 修复