Open tyler-suard-parker opened 2 months ago
Here is a config that I use to connect to azure oai.
{
"base_url": "https://xxx-openai-canada-east.openai.azure.com/",
"api_key": "apikey",
"api_version": "2024-05-01-preview",
"model": "<deploy_name>",
"api_type": "azure",
}
Describe the bug
AutoGen was working just fine. Then, we switched to a new Azure OpenAI deployment. Now, I am getting this error but only when using AutoGen. When I use the OpenAI client directly, I do not get the error.
openai.NotFoundError: Error code: 404 - {'error': {'code': 'DeploymentNotFound', 'message': 'The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.'}}
Steps to reproduce
This code works:
client = AzureOpenAI( azure_endpoint="https://myendpoint.openai.azure.com/", api_key="aldsjfasdf", api_version="2024-02-01", )
response = client.chat.completions.create( model="gpt-4",
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?"}, ], )
print(response.choices[0].message.content)
Model Used
gpt-4
Expected Behavior
Autogen should work
Screenshots and logs
No response
Additional Information
No response