markusyeo / ChatGPT-Tele-Bot

Integrate ChatGPT into your own Telegram bot
GNU General Public License v2.0
6 stars 1 forks source link

ERROR - TeleBot: "Error while sending message: That model does not exist" #2

Open nordz0r opened 1 year ago

nordz0r commented 1 year ago

Traceback (most recent call last): File "/DiscordBot/src/bot.py", line 52, in send_message response += "\n".join(f"{await responses.handle_response(question)}".split("\n\n")) File "/DiscordBot/src/responses.py", line 9, in handle_response response = await sync_to_async(chatbot.ask)(message) File "/usr/local/lib/python3.10/site-packages/asgiref/sync.py", line 448, in call ret = await asyncio.wait_for(future, timeout=None) File "/usr/local/lib/python3.10/asyncio/tasks.py", line 408, in wait_for return await fut File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, self.kwargs) File "/usr/local/lib/python3.10/site-packages/asgiref/sync.py", line 490, in thread_handler return func(*args, *kwargs) File "/usr/local/lib/python3.10/site-packages/revChatGPT/Official.py", line 107, in ask completion = self._get_completion( File "/usr/local/lib/python3.10/site-packages/revChatGPT/Official.py", line 47, in _get_completion return openai.Completion.create( File "/usr/local/lib/python3.10/site-packages/openai/api_resources/completion.py", line 25, in create return super().create(args, kwargs) File "/usr/local/lib/python3.10/site-packages/openai/api_resources/abstract/engine_apiresource.py", line 153, in create response, , api_key = requestor.request( File "/usr/local/lib/python3.10/site-packages/openai/api_requestor.py", line 226, in request resp, got_stream = self._interpret_response(result, stream) File "/usr/local/lib/python3.10/site-packages/openai/api_requestor.py", line 619, in _interpret_response self._interpret_response_line( File "/usr/local/lib/python3.10/site-packages/openai/api_requestor.py", line 679, in _interpret_response_line raise self.handle_error_response( openai.error.InvalidRequestError: That model does not exist

markusyeo commented 1 year ago

Sorry bout that, I'm aware the model we used has been taken down. I haven't got time to patch it but it should be fairly easy. You can follow the discord group on people working on the api that I've used.