Class: AgUiProtocol::Core::Events::ReasoningMessageChunkEvent
- Inherits:
-
BaseEvent
- Object
- Types::Model
- BaseEvent
- AgUiProtocol::Core::Events::ReasoningMessageChunkEvent
- Defined in:
- lib/ag_ui_protocol/core/events.rb
Overview
Convenience event for reasoning messages without manually emitting start/end.
“‘ruby event = AgUiProtocol::Core::Events::ReasoningMessageChunkEvent.new(
message_id: "reason_msg_1",
delta: "step 1..."
) “‘
Instance Attribute Summary collapse
-
#delta ⇒ Object
readonly
Returns the value of attribute delta.
-
#message_id ⇒ Object
readonly
Returns the value of attribute message_id.
Attributes inherited from BaseEvent
Instance Method Summary collapse
-
#initialize(message_id: nil, delta: nil, timestamp: nil, raw_event: nil) ⇒ ReasoningMessageChunkEvent
constructor
A new instance of ReasoningMessageChunkEvent.
- #to_h ⇒ Object
Methods inherited from Types::Model
Constructor Details
#initialize(message_id: nil, delta: nil, timestamp: nil, raw_event: nil) ⇒ ReasoningMessageChunkEvent
Returns a new instance of ReasoningMessageChunkEvent.
1293 1294 1295 1296 1297 |
# File 'lib/ag_ui_protocol/core/events.rb', line 1293 def initialize(message_id: nil, delta: nil, timestamp: nil, raw_event: nil) super(type: EventType::REASONING_MESSAGE_CHUNK, timestamp: , raw_event: raw_event) @message_id = @delta = delta end |
Instance Attribute Details
#delta ⇒ Object (readonly)
Returns the value of attribute delta.
1279 1280 1281 |
# File 'lib/ag_ui_protocol/core/events.rb', line 1279 def delta @delta end |
#message_id ⇒ Object (readonly)
Returns the value of attribute message_id.
1276 1277 1278 |
# File 'lib/ag_ui_protocol/core/events.rb', line 1276 def @message_id end |
Instance Method Details
#to_h ⇒ Object
1300 1301 1302 |
# File 'lib/ag_ui_protocol/core/events.rb', line 1300 def to_h super.merge(message_id: @message_id, delta: @delta) end |