Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions libs/core/langchain_core/messages/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
def __add__(self, other: Any) -> BaseMessageChunk: # type: ignore[override]
if isinstance(other, ToolMessageChunk):
if self.tool_call_id != other.tool_call_id:
msg = "Cannot concatenate ToolMessageChunks with different names."
msg = "Cannot concatenate ToolMessageChunks with different tool_call_ids."

Check failure on line 186 in libs/core/langchain_core/messages/tool.py

View workflow job for this annotation

GitHub Actions / lint (libs/core, 3.10) / Python 3.10

ruff (E501)

langchain_core/messages/tool.py:186:89: E501 Line too long (90 > 88)

Check failure on line 186 in libs/core/langchain_core/messages/tool.py

View workflow job for this annotation

GitHub Actions / lint (libs/core, 3.13) / Python 3.13

ruff (E501)

langchain_core/messages/tool.py:186:89: E501 Line too long (90 > 88)

Check failure on line 186 in libs/core/langchain_core/messages/tool.py

View workflow job for this annotation

GitHub Actions / lint (libs/core, 3.12) / Python 3.12

ruff (E501)

langchain_core/messages/tool.py:186:89: E501 Line too long (90 > 88)

Check failure on line 186 in libs/core/langchain_core/messages/tool.py

View workflow job for this annotation

GitHub Actions / lint (libs/core, 3.11) / Python 3.11

ruff (E501)

langchain_core/messages/tool.py:186:89: E501 Line too long (90 > 88)

Check failure on line 186 in libs/core/langchain_core/messages/tool.py

View workflow job for this annotation

GitHub Actions / lint (libs/core, 3.14) / Python 3.14

ruff (E501)

langchain_core/messages/tool.py:186:89: E501 Line too long (90 > 88)
raise ValueError(msg)

return self.__class__(
Expand Down Expand Up @@ -371,13 +371,13 @@
id=raw_tool_call.get("id"),
)
tool_calls.append(parsed)
except json.JSONDecodeError:
except json.JSONDecodeError as e:
invalid_tool_calls.append(
invalid_tool_call(
name=function_name,
args=raw_tool_call["function"]["arguments"],
id=raw_tool_call.get("id"),
error=None,
error=str(e),
)
)
return tool_calls, invalid_tool_calls
Expand Down
Loading