Hello everyone, yesterday I created a simple app in hugging face platform. The app is just a gradio chat integrated with openai.
The app was working fine yesterday however today everytime I try to ask something to the chat it gives the following error:
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File β/home/user/.local/lib/python3.10/site-packages/gradio/routes.pyβ, line 437, in run_predict
output = await app.get_blocks().process_api(
File β/home/user/.local/lib/python3.10/site-packages/gradio/blocks.pyβ, line 1352, in process_api
result = await self.call_function(
File β/home/user/.local/lib/python3.10/site-packages/gradio/blocks.pyβ, line 1077, in call_function
prediction = await anyio.to_thread.run_sync(
File β/home/user/.local/lib/python3.10/site-packages/anyio/to_thread.pyβ, line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File β/home/user/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.pyβ, line 877, in run_sync_in_worker_thread
return await future
File β/home/user/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.pyβ, line 807, in run
result = context.run(func, *args)
File β/home/user/app/app.pyβ, line 13, in chatbot
chat = openai.ChatCompletion.create(
File β/home/user/.local/lib/python3.10/site-packages/openai/api_resources/chat_completion.pyβ, line 25, in create
return super().create(*args, **kwargs)
File β/home/user/.local/lib/python3.10/site-packages/openai/api_resources/abstract/engine_api_resource.pyβ, line 153, in create
response, _, api_key = requestor.request(
File β/home/user/.local/lib/python3.10/site-packages/openai/api_requestor.pyβ, line 288, in request
result = self.request_raw(
File β/home/user/.local/lib/python3.10/site-packages/openai/api_requestor.pyβ, line 609, in request_raw
raise error.APIConnectionError(
openai.error.APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host=βapi.openai.comβ, port=443): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError(β<urllib3.connection.HTTPSConnection object at 0x7f3e8525d9c0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolutionβ))
Not sure why today is having that error
Any idea?
I also have the same application in a virtual machine and it works fine there, the only place it does not work is in huggingface
Thanks in advance!