Closed ImShEthan closed 1 year ago
whot it now uses gpt4 if it fails
idk u just reinstall the repo and got the same...
Also, I created a french lang files I add it here cuz idk how to pull requests (can't send the lang.fr) fr.txt
Got the same problem with deepai default model it maybe the generated api_key is causing the 401 error, also when I force the bot to use eva model, it instantly delete the temp_message, looks like eva returns an empty response ? I don't know
Edit : I figured out that for the deepai problem it is from a shadow ip ban, using a proxy fixed it on my side
| Task exception was never retrieved | future: <Task finished name='Task-17' coro=<on_message..generate_response_in_thread() done, defined at /home/ethan/Discord-AI-Chatbot/main.py:271> exception=ClientResponseError(RequestInfo(url=URL('https://api.deepai.org/chat_response'), method='POST', headers=<CIMultiDictProxy('Host': 'api.deepai.org', 'api-key': 'tryit-61249411764-a198f6ad91261e7d41cb4b25b4f58917', 'user-agent': 'Mozilla/5.0 (Windows NT 5.2; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.41 Safari/535.1', 'Accept': '/', 'Accept-Encoding': 'gzip, deflate', 'Content-Length': '4303', 'Content-Type': 'application/x-www-form-urlencoded')>, real_url=URL('https://api.deepai.org/chat_response')), (), status=401, message='Unauthorized', headers=<CIMultiDictProxy('Date': 'Sun, 28 May 2023 16:36:19 GMT', 'Content-Type': 'application/json', 'Content-Length': '39', 'Connection': 'keep-alive', 'Status': '401 Unauthorized', 'Vary': 'origin, Cookie', 'Referrer-Policy': 'same-origin', 'X-Frame-Options': 'ALLOWALL', 'X-Content-Type-Options': 'nosniff', 'X-Powered-By': 'Phusion Passenger(R)', 'Server': 'nginx + Phusion Passenger(R)')>)>
0|TatanePython | Traceback (most recent call last):
0|TatanePython | File "/home/ethan/Discord-AI-Chatbot/main.py", line 273, in generate_response_in_thread
0|TatanePython | response = await generate_response(history, search_results, yt_transcript, image_caption, botname, username)
0|TatanePython | File "/home/ethan/Discord-AI-Chatbot/main.py", line 81, in generate_response
0|TatanePython | response = await deepai.ChatCompletion.create(messages)
0|TatanePython | File "/home/ethan/Discord-AI-Chatbot/model/deepai.py", line 34, in create
0|TatanePython | response.raise_for_status()
0|TatanePython | File "/usr/local/lib/python3.9/dist-packages/aiohttp/client_reqrep.py", line 1005, in raise_for_status
0|TatanePython | raise ClientResponseError(
0|TatanePython | aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized', url=URL('https://api.deepai.org/chat_response')