Class: Events::ToolCall
Constant Summary collapse
- TYPE =
"tool_call"
Instance Attribute Summary collapse
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
-
#tool_input ⇒ Object
readonly
Returns the value of attribute tool_input.
-
#tool_name ⇒ Object
readonly
Returns the value of attribute tool_name.
-
#tool_use_id ⇒ Object
readonly
Returns the value of attribute tool_use_id.
Attributes inherited from Base
#content, #session_id, #timestamp
Instance Method Summary collapse
-
#initialize(content:, tool_name:, tool_input: {}, tool_use_id: nil, timeout: nil, session_id: nil) ⇒ ToolCall
constructor
A new instance of ToolCall.
- #to_h ⇒ Object
- #type ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(content:, tool_name:, tool_input: {}, tool_use_id: nil, timeout: nil, session_id: nil) ⇒ ToolCall
Returns a new instance of ToolCall.
15 16 17 18 19 20 21 |
# File 'lib/events/tool_call.rb', line 15 def initialize(content:, tool_name:, tool_input: {}, tool_use_id: nil, timeout: nil, session_id: nil) super(content: content, session_id: session_id) @tool_name = tool_name @tool_input = tool_input @tool_use_id = tool_use_id @timeout = timeout end |
Instance Attribute Details
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
7 8 9 |
# File 'lib/events/tool_call.rb', line 7 def timeout @timeout end |
#tool_input ⇒ Object (readonly)
Returns the value of attribute tool_input.
7 8 9 |
# File 'lib/events/tool_call.rb', line 7 def tool_input @tool_input end |
#tool_name ⇒ Object (readonly)
Returns the value of attribute tool_name.
7 8 9 |
# File 'lib/events/tool_call.rb', line 7 def tool_name @tool_name end |
#tool_use_id ⇒ Object (readonly)
Returns the value of attribute tool_use_id.
7 8 9 |
# File 'lib/events/tool_call.rb', line 7 def tool_use_id @tool_use_id end |
Instance Method Details
#to_h ⇒ Object
27 28 29 |
# File 'lib/events/tool_call.rb', line 27 def to_h super.merge(tool_name: tool_name, tool_input: tool_input, tool_use_id: tool_use_id, timeout: timeout) end |
#type ⇒ Object
23 24 25 |
# File 'lib/events/tool_call.rb', line 23 def type TYPE end |