diff --git a/python/semantic_kernel/connectors/ai/open_ai/prompt_execution_settings/azure_chat_prompt_execution_settings.py b/python/semantic_kernel/connectors/ai/open_ai/prompt_execution_settings/azure_chat_prompt_execution_settings.py index 3a2398457c..a8812bae8a 100644 --- a/python/semantic_kernel/connectors/ai/open_ai/prompt_execution_settings/azure_chat_prompt_execution_settings.py +++ b/python/semantic_kernel/connectors/ai/open_ai/prompt_execution_settings/azure_chat_prompt_execution_settings.py @@ -99,5 +99,4 @@ class ExtraBody(KernelBaseModel): class AzureChatPromptExecutionSettings(OpenAIChatPromptExecutionSettings): """Specific settings for the Azure OpenAI Chat Completion endpoint.""" - response_format: str | None = None extra_body: dict[str, Any] | ExtraBody | None = None diff --git a/python/tests/unit/connectors/open_ai/test_openai_request_settings.py b/python/tests/unit/connectors/open_ai/test_openai_request_settings.py index 3df08a5a08..a27ec9fba7 100644 --- a/python/tests/unit/connectors/open_ai/test_openai_request_settings.py +++ b/python/tests/unit/connectors/open_ai/test_openai_request_settings.py @@ -263,3 +263,10 @@ def test_azure_open_ai_chat_prompt_execution_settings_with_aisearch_data_sources } settings = AzureChatPromptExecutionSettings.model_validate(input_dict, strict=True, from_attributes=True) assert settings.extra_body["dataSources"][0]["type"] == "AzureCognitiveSearch" + + +def test_azure_open_ai_chat_prompt_execution_settings_with_response_format_json(): + response_format = {"type": "json_object"} + settings = AzureChatPromptExecutionSettings(response_format=response_format) + options = settings.prepare_settings_dict() + assert options["response_format"] == response_format