mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-24 20:12:11 +00:00
fix(openai): Chat Message Annotations
defaults to [ ]
if not list or None (#32614)
This commit is contained in:
parent
b825f85bf2
commit
4ba222148d
@ -3875,7 +3875,9 @@ def _construct_lc_result_from_responses_api(
|
||||
"annotations": [
|
||||
annotation.model_dump()
|
||||
for annotation in content.annotations
|
||||
],
|
||||
]
|
||||
if isinstance(content.annotations, list)
|
||||
else [],
|
||||
"id": output.id,
|
||||
}
|
||||
content_blocks.append(block)
|
||||
|
Loading…
Reference in New Issue
Block a user