Class: Brute::Loop::ToolCallStep
- Defined in:
- lib/brute/loop/tool_call_step.rb
Overview
A Step that wraps an LLM::Function tool call.
Identity comes from the function’s call ID so tool results can be correlated back to the LLM’s request.
Constant Summary
Constants inherited from Step
Instance Attribute Summary collapse
-
#function ⇒ Object
readonly
Returns the value of attribute function.
Attributes inherited from Step
Instance Method Summary collapse
-
#initialize(function:, **rest) ⇒ ToolCallStep
constructor
A new instance of ToolCallStep.
- #perform(task) ⇒ Object
Methods inherited from Step
#call, #cancel, #error, generate_id, #jobs, #result, #state, #status
Constructor Details
#initialize(function:, **rest) ⇒ ToolCallStep
Returns a new instance of ToolCallStep.
16 17 18 19 |
# File 'lib/brute/loop/tool_call_step.rb', line 16 def initialize(function:, **rest) super(id: function.id, **rest) @function = function end |
Instance Attribute Details
#function ⇒ Object (readonly)
Returns the value of attribute function.
14 15 16 |
# File 'lib/brute/loop/tool_call_step.rb', line 14 def function @function end |
Instance Method Details
#perform(task) ⇒ Object
21 22 23 |
# File 'lib/brute/loop/tool_call_step.rb', line 21 def perform(task) @function.call end |