mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-22 17:45:09 +02:00
fix: add state attribute to ToolCallRequest overrides (#6668)
Following https://github.com/langchain-ai/langchain/pull/34692
This commit is contained in:
@@ -121,6 +121,7 @@ class _ToolCallRequestOverrides(TypedDict, total=False):
|
||||
"""Possible overrides for ToolCallRequest.override() method."""
|
||||
|
||||
tool_call: ToolCall
|
||||
state: Any
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -170,8 +171,12 @@ class ToolCallRequest:
|
||||
This follows an immutable pattern, leaving the original request unchanged.
|
||||
|
||||
Args:
|
||||
**overrides: Keyword arguments for attributes to override. Supported keys:
|
||||
- tool_call: Tool call dict with name, args, and id
|
||||
**overrides: Keyword arguments for attributes to override.
|
||||
|
||||
Supported keys:
|
||||
|
||||
- tool_call: Tool call dict with `name`, `args`, and `id`
|
||||
- state: Agent state (`dict`, `list`, or `BaseModel`)
|
||||
|
||||
Returns:
|
||||
New ToolCallRequest instance with specified overrides applied.
|
||||
|
||||
Reference in New Issue
Block a user