Class: AgUiProtocol::Core::Events::ReasoningStartEvent

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

Overview

Signals the start of a reasoning block.

“‘ruby event = AgUiProtocol::Core::Events::ReasoningStartEvent.new(message_id: “reason_1”) “`

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(message_id:, timestamp: nil, raw_event: nil) ⇒ ReasoningStartEvent

Returns a new instance of ReasoningStartEvent.



1156
1157
1158
1159
# File 'lib/ag_ui_protocol/core/events.rb', line 1156

def initialize(message_id:, timestamp: nil, raw_event: nil)
  super(type: EventType::REASONING_START, timestamp: timestamp, raw_event: raw_event)
  @message_id = message_id
end

Instance Attribute Details

#message_idObject (readonly)

Returns the value of attribute message_id.



1150
1151
1152
# File 'lib/ag_ui_protocol/core/events.rb', line 1150

def message_id
  @message_id
end

Instance Method Details

#to_hObject



1162
1163
1164
# File 'lib/ag_ui_protocol/core/events.rb', line 1162

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