mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: updated declarative samples and handling of non-pydantic response formats (#5022)
* updated declarative samples and handling of non-pydantic response formats * fixed from comments * update docstring
This commit is contained in:
committed by
GitHub
Unverified
parent
6acab3d1d6
commit
519bb0cb2b
@@ -1912,9 +1912,7 @@ class RawOpenAIChatClient( # type: ignore[misc]
|
||||
args["usage_details"] = usage_details
|
||||
if structured_response:
|
||||
args["value"] = structured_response
|
||||
elif (response_format := options.get("response_format")) and isinstance(response_format, type):
|
||||
# Only pass response_format to ChatResponse if it's a Pydantic model type,
|
||||
# not a runtime JSON schema dict
|
||||
elif response_format := options.get("response_format"):
|
||||
args["response_format"] = response_format
|
||||
# Set continuation_token when background operation is still in progress
|
||||
if response.status and response.status in ("in_progress", "queued"):
|
||||
|
||||
Reference in New Issue
Block a user