Class: AgUiProtocol::Core::Events::ToolCallEndEvent

Inherits:
BaseEvent show all
Defined in:
lib/ag_ui_protocol/core/events.rb

Overview

Signals the end of a tool call.

“‘ruby

event = AgUiProtocol::Core::Events::ToolCallEndEvent.new(tool_call_id: “tc1”)

“‘

Instance Attribute Summary collapse

Attributes inherited from BaseEvent

#raw_event, #timestamp, #type

Instance Method Summary collapse

Methods inherited from Types::Model

#as_json, #to_json

Constructor Details

#initialize(tool_call_id:, timestamp: nil, raw_event: nil) ⇒ ToolCallEndEvent

Returns a new instance of ToolCallEndEvent.



404
405
406
407
# File 'lib/ag_ui_protocol/core/events.rb', line 404

def initialize(tool_call_id:, timestamp: nil, raw_event: nil)
  super(type: EventType::TOOL_CALL_END, timestamp: timestamp, raw_event: raw_event)
  @tool_call_id = tool_call_id
end

Instance Attribute Details

#tool_call_idObject (readonly)

Returns the value of attribute tool_call_id.



398
399
400
# File 'lib/ag_ui_protocol/core/events.rb', line 398

def tool_call_id
  @tool_call_id
end

Instance Method Details

#to_hObject



410
411
412
# File 'lib/ag_ui_protocol/core/events.rb', line 410

def to_h
  super.merge(tool_call_id: @tool_call_id)
end