Python: Bug: Python: Incompatibility between yaml response_format and AzureAIInference #12290
Labels
ai connector
Anything related to AI connectors
bug
Something isn't working
python
Pull requests for the Python Semantic Kernel
Describe the bug
Declaring the response_format in a yaml file does not work with AzureAIInference.
To Reproduce
Steps to reproduce the behavior:
Create a yaml function:
Try to invoke the function with AzureAIInferenceChatCompletion.
SemanticKernel, and more specificaly AzureAIInferenceChatPromptExecutionSettings expects that response_format to be {"type": "json_schema", "json_schema": {}} link
The problem lies in the fact that the response_format is passed directly to AzureAIInferenceChatCompletion
Therefore, the JsonSchemaFormat cannot be created because it contains {"type": "json_schema", "json_schema": {}} instead of the content of json_schema
Expected behavior
The json_schema is correctly passed when read from dict.
Platform
Additional context
In the code:
# Case 4: response_format is a dictionary (legacy), create JsonSchemaFormat from dict
Does it mean that using YAML isn't intended anymore, or am I missing something?
The text was updated successfully, but these errors were encountered: