Class: DeepAgentsRb::Tools::ToolMessage
- Inherits:
-
Object
- Object
- DeepAgentsRb::Tools::ToolMessage
- Defined in:
- lib/deepagents/deepagentsrb/tools.rb
Overview
Tool message class
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#tool_call_id ⇒ Object
readonly
Returns the value of attribute tool_call_id.
Instance Method Summary collapse
-
#initialize(content, tool_call_id:) ⇒ ToolMessage
constructor
A new instance of ToolMessage.
- #to_h ⇒ Object
Constructor Details
#initialize(content, tool_call_id:) ⇒ ToolMessage
43 44 45 46 |
# File 'lib/deepagents/deepagentsrb/tools.rb', line 43 def initialize(content, tool_call_id:) @content = content @tool_call_id = tool_call_id end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
41 42 43 |
# File 'lib/deepagents/deepagentsrb/tools.rb', line 41 def content @content end |
#tool_call_id ⇒ Object (readonly)
Returns the value of attribute tool_call_id.
41 42 43 |
# File 'lib/deepagents/deepagentsrb/tools.rb', line 41 def tool_call_id @tool_call_id end |
Instance Method Details
#to_h ⇒ Object
48 49 50 51 52 53 54 |
# File 'lib/deepagents/deepagentsrb/tools.rb', line 48 def to_h { role: "tool", content: @content, tool_call_id: @tool_call_id } end |