mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-05 17:27:47 +02:00
refactor: Type narrowing for ToolNode.name (#1678)
Avoid type incompatibility when using `add_node` to add a `ToolNode`.
This commit is contained in:
@@ -79,6 +79,8 @@ class ToolNode(RunnableCallable):
|
||||
- The `AIMessage` MUST have `tool_calls` populated.
|
||||
"""
|
||||
|
||||
name: str = "ToolNode"
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
tools: Sequence[Union[BaseTool, Callable]],
|
||||
|
||||
Reference in New Issue
Block a user