Class: Legion::LLM::Patches::ToolResultWrapper
- Inherits:
-
Struct
- Object
- Struct
- Legion::LLM::Patches::ToolResultWrapper
- Defined in:
- lib/legion/llm/patches/ruby_llm_parallel_tools.rb
Overview
Wraps a raw tool result value so that the bridge-script’s serialize_tool_result can read both :tool_call_id/:id (for UI matching) and :result/:content (for the result payload) off a single object.
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#id ⇒ Object
Returns the value of attribute id.
-
#result ⇒ Object
Returns the value of attribute result.
-
#tool_call_id ⇒ Object
Returns the value of attribute tool_call_id.
-
#tool_name ⇒ Object
Returns the value of attribute tool_name.
Instance Method Summary collapse
-
#is_a?(klass) ⇒ Boolean
(also: #kind_of?)
Delegate is_a? checks for RubyLLM::Tool::Halt so the caller can still detect halt results transparently.
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content
38 39 40 |
# File 'lib/legion/llm/patches/ruby_llm_parallel_tools.rb', line 38 def content @content end |
#id ⇒ Object
Returns the value of attribute id
38 39 40 |
# File 'lib/legion/llm/patches/ruby_llm_parallel_tools.rb', line 38 def id @id end |
#result ⇒ Object
Returns the value of attribute result
38 39 40 |
# File 'lib/legion/llm/patches/ruby_llm_parallel_tools.rb', line 38 def result @result end |
#tool_call_id ⇒ Object
Returns the value of attribute tool_call_id
38 39 40 |
# File 'lib/legion/llm/patches/ruby_llm_parallel_tools.rb', line 38 def tool_call_id @tool_call_id end |
#tool_name ⇒ Object
Returns the value of attribute tool_name
38 39 40 |
# File 'lib/legion/llm/patches/ruby_llm_parallel_tools.rb', line 38 def tool_name @tool_name end |
Instance Method Details
#is_a?(klass) ⇒ Boolean Also known as: kind_of?
Delegate is_a? checks for RubyLLM::Tool::Halt so the caller can still detect halt results transparently.
41 42 43 |
# File 'lib/legion/llm/patches/ruby_llm_parallel_tools.rb', line 41 def is_a?(klass) result.is_a?(klass) || super end |