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.
7 8 9 10 11 |
# File 'lib/riffer/messages/tool.rb', line 7 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.
5 6 7 |
# File 'lib/riffer/messages/tool.rb', line 5 def name @name end |
#tool_call_id ⇒ Object (readonly)
Returns the value of attribute tool_call_id.
5 6 7 |
# File 'lib/riffer/messages/tool.rb', line 5 def tool_call_id @tool_call_id end |
Instance Method Details
#role ⇒ Object
13 14 15 |
# File 'lib/riffer/messages/tool.rb', line 13 def role "tool" end |
#to_h ⇒ Object
17 18 19 |
# File 'lib/riffer/messages/tool.rb', line 17 def to_h {role: role, content: content, tool_call_id: tool_call_id, name: name} end |