The Azure Endpoint is this: AZURE_OPENAI_ENDPOINT=https://[myresource].openai.azure.com/.
I also tried AZURE_OPENAI_ENDPOINT=https://[myresource].openai.azure.com//openai/assistants?api-version=2024-02-15-preview with the same error. Screenshot attached.
The client.beta.assistants.list() function produces the same error.
Hmm, so I updated the code to include the azure_deployment parameter in the model and I still get the connection error. Do you know if there is something specific to Azure that needs to happen? The deployed model is exactly what’s in the code, gpt-4 1106-Preview.
Primero tienes que verificar la Clave de la API, que sea verificada y tenga validez, comprobar el punto inicial de conexiĂłn de la API, asegurar los parámetros, y como siempre digo utilicen la DocumentaciĂłn, si esta desactualizada, pregunten al area de ayuda… inspeccionen la conectividad con Internet, sea local, global, etc que no existan firewalls, cortadores que son de los mas antiguos, o tambien VPNs o bloqueadores, por el desarrollo, disponibilidad de direcciones regionales que confirme el modelo general. Tambien reĂşna informaciĂłn con descripciones… por ultimo para resoluciĂłn de problemas, actualizaciĂłn de Software, si no tenemos eso, cambiar dispositivos fĂsicos, bibliotecas de Clientes, aprovechar registro Azure; y verificar estado de la API ¡Saludos!
When I am trying to run Python code for Azure OpenAI API Chat Completions locally, providing all required parameters, it is giving me below error intermittently. Need your help, if you could suggest how this could be resolved.
httpcore.ConnectError: [Errno 11001] getaddrinfo failed
The above exception was the direct cause of the following exception:
httpx.ConnectError: [Errno 11001] getaddrinfo failed
The above exception was the direct cause of the following exception:
raise APIConnectionError(request=request) from err
openai.APIConnectionError: Connection error.
Thanks for sharing. We have the same code & it’s working in AWS EC2 environment, but problem lies (connection error) when we run it from local internet connection.
By the way, when you say worked , you run it in your local internet connection or any other organization internet etc.