You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have used the Azure OpenAI model as follows in cookbook/teams/01_hn_team.py example:
from phi.model.azure import AzureOpenAIChat
azure_model = AzureOpenAIChat(
id="gpt4o",
api_version="2024-08-01-preview",
azure_endpoint="https://xxx-eus.openai.azure.com/",
api_key="azure api key",
azure_deployment="gpt-4o"
)
I then pass azure_model as a model parameter in each Agent.
Problem:
The provided example in HackerNews Team (cookbook/teams/01_hn_team.py) does not work with the Azure OpenAI model, and I receive the following error:
Error code: 400 - {'error': {'message': "'messages' must contain the word 'json' in some form, to use 'response_format' of type 'json_object'.", 'type': 'invalid_request_error', 'param': 'messages', 'code': None}}
Does the Azure OpenAI model require a different format for messages to support response_format='json_object'?
Are there any known workarounds or modifications needed to make this example work with Azure OpenAI?
Would appreciate any insights or fixes! Thanks in advance.
The text was updated successfully, but these errors were encountered:
I have used the Azure OpenAI model as follows in
cookbook/teams/01_hn_team.py
example:I then pass
azure_model
as a model parameter in each Agent.Problem:
The provided example in HackerNews Team (
cookbook/teams/01_hn_team.py
) does not work with the Azure OpenAI model, and I receive the following error:messages
to supportresponse_format='json_object'
?Would appreciate any insights or fixes! Thanks in advance.
The text was updated successfully, but these errors were encountered: