langgraph[fix]: pass config to tools (#2724)

Fixes #2723
This commit is contained in:
Vadym Barda
2024-12-11 21:43:29 +00:00
committed by GitHub
parent ff3bc2f982
commit f642fb6545
@@ -297,7 +297,7 @@ class ToolNode(RunnableCallable):
try:
input = {**call, **{"type": "tool_call"}}
response = self.tools_by_name[call["name"]].invoke(input)
response = self.tools_by_name[call["name"]].invoke(input, config)
# GraphInterrupt is a special exception that will always be raised.
# It can be triggered in the following scenarios:
@@ -352,7 +352,7 @@ class ToolNode(RunnableCallable):
try:
input = {**call, **{"type": "tool_call"}}
response = await self.tools_by_name[call["name"]].ainvoke(input)
response = await self.tools_by_name[call["name"]].ainvoke(input, config)
# GraphInterrupt is a special exception that will always be raised.
# It can be triggered in the following scenarios: