Class: RubyCode::ToolCall
- Inherits:
-
Object
- Object
- RubyCode::ToolCall
- Defined in:
- lib/rubycode/value_objects.rb
Overview
Represents a tool call from the LLM
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name:, arguments:) ⇒ ToolCall
constructor
A new instance of ToolCall.
- #to_h ⇒ Object
Constructor Details
#initialize(name:, arguments:) ⇒ ToolCall
Returns a new instance of ToolCall.
33 34 35 36 |
# File 'lib/rubycode/value_objects.rb', line 33 def initialize(name:, arguments:) @name = name @arguments = arguments end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
31 32 33 |
# File 'lib/rubycode/value_objects.rb', line 31 def arguments @arguments end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
31 32 33 |
# File 'lib/rubycode/value_objects.rb', line 31 def name @name end |
Instance Method Details
#==(other) ⇒ Object
42 43 44 45 46 |
# File 'lib/rubycode/value_objects.rb', line 42 def ==(other) other.is_a?(ToolCall) && name == other.name && arguments == other.arguments end |
#to_h ⇒ Object
38 39 40 |
# File 'lib/rubycode/value_objects.rb', line 38 def to_h { name: name, arguments: arguments } end |