Class: AgUiProtocol::Core::Events::ToolCallStartEvent
- Inherits:
-
BaseEvent
- Object
- Types::Model
- BaseEvent
- AgUiProtocol::Core::Events::ToolCallStartEvent
- Defined in:
- lib/ag_ui_protocol/core/events.rb
Overview
Signals the start of a tool call.
“‘ruby
event = AgUiProtocol::Core::Events::ToolCallStartEvent.new(
tool_call_id: "tc1",
tool_call_name: "search",
parent_message_id: nil
)
“‘
Instance Attribute Summary collapse
-
#parent_message_id ⇒ Object
readonly
Returns the value of attribute parent_message_id.
-
#tool_call_id ⇒ Object
readonly
Returns the value of attribute tool_call_id.
-
#tool_call_name ⇒ Object
readonly
Returns the value of attribute tool_call_name.
Attributes inherited from BaseEvent
Instance Method Summary collapse
-
#initialize(tool_call_id:, tool_call_name:, parent_message_id: nil, timestamp: nil, raw_event: nil) ⇒ ToolCallStartEvent
constructor
A new instance of ToolCallStartEvent.
- #to_h ⇒ Object
Methods inherited from Types::Model
Constructor Details
#initialize(tool_call_id:, tool_call_name:, parent_message_id: nil, timestamp: nil, raw_event: nil) ⇒ ToolCallStartEvent
Returns a new instance of ToolCallStartEvent.
362 363 364 365 366 367 |
# File 'lib/ag_ui_protocol/core/events.rb', line 362 def initialize(tool_call_id:, tool_call_name:, parent_message_id: nil, timestamp: nil, raw_event: nil) super(type: EventType::TOOL_CALL_START, timestamp: , raw_event: raw_event) @tool_call_id = tool_call_id @tool_call_name = tool_call_name @parent_message_id = end |
Instance Attribute Details
#parent_message_id ⇒ Object (readonly)
Returns the value of attribute parent_message_id.
346 347 348 |
# File 'lib/ag_ui_protocol/core/events.rb', line 346 def @parent_message_id end |
#tool_call_id ⇒ Object (readonly)
Returns the value of attribute tool_call_id.
340 341 342 |
# File 'lib/ag_ui_protocol/core/events.rb', line 340 def tool_call_id @tool_call_id end |
#tool_call_name ⇒ Object (readonly)
Returns the value of attribute tool_call_name.
343 344 345 |
# File 'lib/ag_ui_protocol/core/events.rb', line 343 def tool_call_name @tool_call_name end |
Instance Method Details
#to_h ⇒ Object
370 371 372 |
# File 'lib/ag_ui_protocol/core/events.rb', line 370 def to_h super.merge(tool_call_id: @tool_call_id, tool_call_name: @tool_call_name, parent_message_id: @parent_message_id) end |