Share via

Got "Connection error" by AzureOpenAI Chat Completions on Azure Kubernetes services, can anyone advise?

Ying, Jun 0 Reputation points
2025-04-16T05:33:54.69+00:00

When I try to test the below Chat Completions codes, I got "Connection error".

https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/managed-identity

response = client.chat.completions.create( model="gpt-35-turbo-0125", # model = "deployment_name". messages=[ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Does Azure OpenAI support customer managed keys?"}, {"role": "assistant", "content": "Yes, customer managed keys are supported by Azure OpenAI."}, {"role": "user", "content": "Do other Azure AI services support this too?"} ] )

Azure OpenAI in Foundry Models

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.