Files
semantic-kernel/python/semantic_kernel/connectors
Daniele Antonio MaggioandEvan Mattson 5d25f6a8dd Python: fix: Remove wrong response_format override in AzureChatPromptExecutionSettings class (#6424)
### 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:

```python 
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

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

Co-authored-by: Evan Mattson <[email protected]>
2024-05-29 15:52:50 +00:00
..