mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: fix: correct BadRequestError when using Pydantic model in response_fo… (#1843)
* fix: correct BadRequestError when using Pydantic model in response_format * Fix lint --------- Co-authored-by: Evan Mattson <evan.mattson@microsoft.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
ca1532cf22
commit
0298e0a401
@@ -437,7 +437,10 @@ class OpenAIAssistantsClient(OpenAIConfigMixin, BaseChatClient):
|
||||
if chat_options.response_format is not None:
|
||||
run_options["response_format"] = {
|
||||
"type": "json_schema",
|
||||
"json_schema": chat_options.response_format.model_json_schema(),
|
||||
"json_schema": {
|
||||
"name": chat_options.response_format.__name__,
|
||||
"schema": chat_options.response_format.model_json_schema(),
|
||||
},
|
||||
}
|
||||
|
||||
instructions: list[str] = []
|
||||
|
||||
Reference in New Issue
Block a user