mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-25 04:23:05 +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": [
|
"annotations": [
|
||||||
annotation.model_dump()
|
annotation.model_dump()
|
||||||
for annotation in content.annotations
|
for annotation in content.annotations
|
||||||
],
|
]
|
||||||
|
if isinstance(content.annotations, list)
|
||||||
|
else [],
|
||||||
"id": output.id,
|
"id": output.id,
|
||||||
}
|
}
|
||||||
content_blocks.append(block)
|
content_blocks.append(block)
|
||||||
|
Loading…
Reference in New Issue
Block a user