Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: fix: Remove wrong response_format override in AzureChatPromptExecutionSettings class #6424

Merged
merged 2 commits into from
May 29, 2024

Conversation

danigian
Copy link
Contributor

Motivation and Context

This change is required to fix #5997

Description

The change is removing the wrong response_format override in AzureChatPromptExecutionSettings class. The PR is also adding a unit test covering the case where response format is defined.

The changes were successfully tested against an Azure OpenAI instance with a gpt-4o deployment by specifying an AzureChatPromptExecutionSettings like follows:

execution_settings =  AzureChatPromptExecutionSettings(
        service_id=service_id,
        ai_model_id=ai_model_id,
        max_tokens=1000,
        temperature=0.2,
        response_format={"type": "json_object"},
    )

Contribution Checklist

@danigian danigian requested a review from a team as a code owner May 28, 2024 10:20
@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label May 28, 2024
@github-actions github-actions bot changed the title fix: Remove wrong response_format override in AzureChatPromptExecutionSettings class Python: fix: Remove wrong response_format override in AzureChatPromptExecutionSettings class May 28, 2024
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented May 28, 2024

Py3.10 Test Coverage

Python 3.10 Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/connectors/ai/open_ai/prompt_execution_settings
   azure_chat_prompt_execution_settings.py62198%96
TOTAL612688186% 

Python 3.10 Unit Test Overview

Tests Skipped Failures Errors Time
1394 1 💤 0 ❌ 0 🔥 18.845s ⏱️

Copy link
Member

@eavanvalkenburg eavanvalkenburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, looks good!

@moonbox3 moonbox3 added this pull request to the merge queue May 29, 2024
Merged via the queue into microsoft:main with commit 5d25f6a May 29, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests for the Python Semantic Kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python response_format not implemented correctly
4 participants