fix response_format={'type': 'json_object'} not working for Azure models (#5468)

This commit is contained in:
Simon S. Viloria 2024-09-01 22:31:13 +02:00 committed by GitHub
parent 37f9705d6e
commit 7778fa0146
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -272,6 +272,8 @@ class AzureOpenAIConfig:
optional_params["tools"] = [_tool] optional_params["tools"] = [_tool]
optional_params["tool_choice"] = _tool_choice optional_params["tool_choice"] = _tool_choice
optional_params["json_mode"] = True optional_params["json_mode"] = True
else:
optional_params["response_format"] = value
elif param in supported_openai_params: elif param in supported_openai_params:
optional_params[param] = value optional_params[param] = value