Class: Truffle::ToolCall
- Inherits:
-
Struct
- Object
- Struct
- Truffle::ToolCall
- Defined in:
- lib/truffle/message.rb
Overview
A single tool invocation requested by the model.
Instance Attribute Summary collapse
-
#arguments ⇒ Object
Returns the value of attribute arguments.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#to_h ⇒ Object
arguments is always a parsed Hash with string keys, mirroring the JSON the model emitted.
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments
67 68 69 |
# File 'lib/truffle/message.rb', line 67 def arguments @arguments end |
#id ⇒ Object
Returns the value of attribute id
67 68 69 |
# File 'lib/truffle/message.rb', line 67 def id @id end |
#name ⇒ Object
Returns the value of attribute name
67 68 69 |
# File 'lib/truffle/message.rb', line 67 def name @name end |
Instance Method Details
#to_h ⇒ Object
arguments is always a parsed Hash with string keys, mirroring the JSON the model emitted. The agent symbolizes keys before handing them to the tool.
70 71 72 |
# File 'lib/truffle/message.rb', line 70 def to_h { id: id, name: name, arguments: arguments } end |