Class: Riffer::Messages::Tool
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#tool_call_id ⇒ Object
readonly
Returns the value of attribute tool_call_id.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(content, tool_call_id:, name:) ⇒ Tool
constructor
A new instance of Tool.
- #role ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize(content, tool_call_id:, name:) ⇒ Tool
Returns a new instance of Tool.
6 7 8 9 10 |
# File 'lib/riffer/messages/tool.rb', line 6 def initialize(content, tool_call_id:, name:) super(content) @tool_call_id = tool_call_id @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/riffer/messages/tool.rb', line 4 def name @name end |
#tool_call_id ⇒ Object (readonly)
Returns the value of attribute tool_call_id.
4 5 6 |
# File 'lib/riffer/messages/tool.rb', line 4 def tool_call_id @tool_call_id end |
Instance Method Details
#role ⇒ Object
12 13 14 |
# File 'lib/riffer/messages/tool.rb', line 12 def role "tool" end |
#to_h ⇒ Object
16 17 18 |
# File 'lib/riffer/messages/tool.rb', line 16 def to_h {role: role, content: content, tool_call_id: tool_call_id, name: name} end |