Skip to content

Commit

Permalink
langgraph[fix]: pass config to tools (#2724)
Browse files Browse the repository at this point in the history
Fixes #2723
  • Loading branch information
vbarda authored Dec 11, 2024
1 parent ff3bc2f commit f642fb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/langgraph/langgraph/prebuilt/tool_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def _run_one(

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:
Expand Down Expand Up @@ -352,7 +352,7 @@ async def _arun_one(

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:
Expand Down

0 comments on commit f642fb6

Please sign in to comment.