mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: fix: exclude null file_id from input_image payload to prevent 400 sch… (#5125)
* fix: exclude null file_id from input_image payload to prevent 400 schema error (#5120) * test: add case for additional_properties present without file_id key --------- Co-authored-by: Sergey Borisov <sergey.borisov@dataimpact.io>
This commit is contained in:
@@ -1405,7 +1405,7 @@ class RawOpenAIChatClient( # type: ignore[misc]
|
||||
else "auto",
|
||||
}
|
||||
file_id = content.additional_properties.get("file_id") if content.additional_properties else None
|
||||
if file_id:
|
||||
if file_id is not None:
|
||||
result["file_id"] = file_id
|
||||
return result
|
||||
if content.has_top_level_media_type("audio"):
|
||||
|
||||
Reference in New Issue
Block a user