Class: LangGraphRB::ToolNode

Inherits:
Node
  • Object
show all
Defined in:
lib/langgraph_rb/node.rb

Overview

Specialized node for tool calls

Instance Attribute Summary collapse

Attributes inherited from Node

#block, #name

Instance Method Summary collapse

Methods inherited from Node

#call, #inspect, #to_s

Constructor Details

#initialize(name, tools:, &block) ⇒ ToolNode

Returns a new instance of ToolNode.



108
109
110
111
# File 'lib/langgraph_rb/node.rb', line 108

def initialize(name, tools:, &block)
  @tools = tools
  super(name, &(block || method(:default_tool_call)))
end

Instance Attribute Details

#toolsObject (readonly)

Returns the value of attribute tools.



106
107
108
# File 'lib/langgraph_rb/node.rb', line 106

def tools
  @tools
end