mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-05 03:02:35 +00:00
comment
This commit is contained in:
parent
eb6f8f933a
commit
20a99c1682
@ -109,11 +109,11 @@ def merge_lists(left: Optional[list], *others: Optional[list]) -> Optional[list]
|
|||||||
)
|
)
|
||||||
merged[to_merge[0]] = merge_dicts(merged[to_merge[0]], new_e)
|
merged[to_merge[0]] = merge_dicts(merged[to_merge[0]], new_e)
|
||||||
# Special handling for tool call chunks: if this chunk appears to be
|
# Special handling for tool call chunks: if this chunk appears to be
|
||||||
# a continuation (has None name/id) and no matching index was found,
|
# a continuation of a prior chunk (has None name/id) and no matching
|
||||||
# try to merge with the most recent tool call chunk that has a
|
# index was found, try to merge with the most recent tool call chunk
|
||||||
# name/id.
|
# that has a name/id.
|
||||||
# This fixes issues with models like Qwen3 that send inconsistent
|
# Fixes issues with models that send inconsistent indices.
|
||||||
# indices.
|
# See #31511 for more.
|
||||||
elif (
|
elif (
|
||||||
e.get("type") == "tool_call_chunk"
|
e.get("type") == "tool_call_chunk"
|
||||||
and e.get("name") is None
|
and e.get("name") is None
|
||||||
|
Loading…
Reference in New Issue
Block a user