2023-06-23 08:11:20 - WARNING! engine is not default parameter. engine was transferred to model_kwargs. Please confirm that engine is what you intended. 2023-06-23 08:11:20 - Your app is available at http://localhost:8000 2023-06-23 08:21:13 - Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")': //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 2023-06-23 08:21:13 - Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")': //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 2023-06-23 08:21:13 - Retrying langchain.chat_models.openai.ChatOpenAI.completion_with_retry.._completion_with_retry in 1.0 seconds as it raised APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='opencatgpt.openai.azure.com', port=443): Max retries exceeded with url: //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 (Caused by NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")). 2023-06-23 08:21:14 - Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")': //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 2023-06-23 08:21:14 - Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")': //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 2023-06-23 08:21:14 - Retrying langchain.chat_models.openai.ChatOpenAI.completion_with_retry.._completion_with_retry in 2.0 seconds as it raised APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='opencatgpt.openai.azure.com', port=443): Max retries exceeded with url: //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 (Caused by NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")). 2023-06-23 08:21:16 - Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")': //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 2023-06-23 08:21:16 - Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")': //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 2023-06-23 08:21:16 - Retrying langchain.chat_models.openai.ChatOpenAI.completion_with_retry.._completion_with_retry in 4.0 seconds as it raised APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='opencatgpt.openai.azure.com', port=443): Max retries exceeded with url: //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 (Caused by NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")). 2023-06-23 08:21:20 - Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")': //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 2023-06-23 08:21:20 - Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")': //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 2023-06-23 08:21:20 - Retrying langchain.chat_models.openai.ChatOpenAI.completion_with_retry.._completion_with_retry in 8.0 seconds as it raised APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='opencatgpt.openai.azure.com', port=443): Max retries exceeded with url: //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 (Caused by NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")). 2023-06-23 08:21:28 - Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")': //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 2023-06-23 08:21:28 - Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")': //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 2023-06-23 08:21:28 - Retrying langchain.chat_models.openai.ChatOpenAI.completion_with_retry.._completion_with_retry in 16.0 seconds as it raised APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='opencatgpt.openai.azure.com', port=443): Max retries exceeded with url: //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 (Caused by NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")). 2023-06-23 08:21:44 - Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")': //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 2023-06-23 08:21:44 - Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")': //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 2023-06-23 08:21:44 - Error communicating with OpenAI: HTTPSConnectionPool(host='opencatgpt.openai.azure.com', port=443): Max retries exceeded with url: //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 (Caused by NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")) Traceback (most recent call last): File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/urllib3/connection.py", line 200, in _new_conn sock = connection.create_connection( File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/urllib3/util/connection.py", line 60, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/socket.py", line 954, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno 8] nodename nor servname provided, or not known The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/urllib3/connectionpool.py", line 790, in urlopen response = self._make_request( File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/urllib3/connectionpool.py", line 491, in _make_request raise new_e File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/urllib3/connectionpool.py", line 467, in _make_request self._validate_conn(conn) File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1092, in _validate_conn conn.connect() File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/urllib3/connection.py", line 604, in connect self.sock = sock = self._new_conn() File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/urllib3/connection.py", line 207, in _new_conn raise NameResolutionError(self.host, self, e) from e urllib3.exceptions.NameResolutionError: : Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/urllib3/connectionpool.py", line 874, in urlopen return self.urlopen( File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/urllib3/connectionpool.py", line 874, in urlopen return self.urlopen( File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/urllib3/connectionpool.py", line 844, in urlopen retries = retries.increment( File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/urllib3/util/retry.py", line 515, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='opencatgpt.openai.azure.com', port=443): Max retries exceeded with url: //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 (Caused by NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/openai/api_requestor.py", line 520, in request_raw result = _thread_context.session.request( File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/requests/adapters.py", line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='opencatgpt.openai.azure.com', port=443): Max retries exceeded with url: //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 (Caused by NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)")) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/chainlit/__init__.py", line 61, in wrapper return await user_function(**params_values) File "azure_demo.py", line 24, in main res = await cl.make_async(sync_func)() File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/asyncer/_main.py", line 358, in wrapper return await anyio.to_thread.run_sync( File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/anyio/to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/asyncio/futures.py", line 284, in __await__ yield self # This tells Task to wait for completion. File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/asyncio/tasks.py", line 328, in __wakeup future.result() File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/asyncio/futures.py", line 201, in result raise self._exception File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 807, in run result = context.run(func, *args) File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/chainlit/sync.py", line 20, in wrapper res = function(*args, **kwargs) File "azure_demo.py", line 35, in sync_func return chat(history) File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/langchain/chat_models/base.py", line 208, in __call__ generation = self.generate( File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/langchain/chat_models/base.py", line 102, in generate raise e File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/langchain/chat_models/base.py", line 94, in generate results = [ File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/langchain/chat_models/base.py", line 95, in self._generate(m, stop=stop, run_manager=run_manager, **kwargs) File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/langchain/chat_models/openai.py", line 359, in _generate response = self.completion_with_retry(messages=message_dicts, **params) File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/langchain/chat_models/openai.py", line 307, in completion_with_retry return _completion_with_retry(**kwargs) File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/tenacity/__init__.py", line 289, in wrapped_f return self(f, *args, **kw) File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/tenacity/__init__.py", line 379, in __call__ do = self.iter(retry_state=retry_state) File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/tenacity/__init__.py", line 325, in iter raise retry_exc.reraise() File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/tenacity/__init__.py", line 158, in reraise raise self.last_attempt.result() File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/concurrent/futures/_base.py", line 439, in result return self.__get_result() File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result raise self._exception File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/tenacity/__init__.py", line 382, in __call__ result = fn(*args, **kwargs) File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/langchain/chat_models/openai.py", line 305, in _completion_with_retry return self.client.create(**kwargs) File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/openai/api_resources/chat_completion.py", line 25, in create return super().create(*args, **kwargs) File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create response, _, api_key = requestor.request( File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/openai/api_requestor.py", line 220, in request result = self.request_raw( File "/Users/qinyingjie/miniconda3/envs/py36tf1/lib/python3.9/site-packages/openai/api_requestor.py", line 533, in request_raw raise error.APIConnectionError( openai.error.APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='opencatgpt.openai.azure.com', port=443): Max retries exceeded with url: //openai/deployments/gpt-35-turbo/chat/completions?api-version=2023-05-15 (Caused by NameResolutionError(": Failed to resolve 'opencatgpt.openai.azure.com' ([Errno 8] nodename nor servname provided, or not known)"))