mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-08 10:47:52 +02:00
Apply patch [skip ci]
This commit is contained in:
@@ -1320,8 +1320,10 @@ def create_react_agent(
|
||||
]
|
||||
|
||||
if pending_tool_calls:
|
||||
# Create a temporary ToolExecutor to inject tool arguments
|
||||
temp_executor = ToolExecutor(tool_classes[0]) if tool_classes else None
|
||||
pending_tool_calls = [
|
||||
tool_node.inject_tool_args(call, state, store) # type: ignore[arg-type]
|
||||
temp_executor.inject_tool_args(call, state, store) if temp_executor else call # type: ignore[arg-type]
|
||||
for call in pending_tool_calls
|
||||
]
|
||||
return [Send(call["name"], call) for call in pending_tool_calls]
|
||||
@@ -1395,3 +1397,4 @@ __all__ = [
|
||||
"AgentStateWithStructuredResponsePydantic",
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user