Class: AgUiProtocol::Core::Events::TextMessageEndEvent
- Inherits:
-
BaseEvent
- Object
- Types::Model
- BaseEvent
- AgUiProtocol::Core::Events::TextMessageEndEvent
- Defined in:
- lib/ag_ui_protocol/core/events.rb
Overview
Signals the end of a text message.
“‘ruby
event = AgUiProtocol::Core::Events::TextMessageEndEvent.new(message_id: “m1”)
“‘
Instance Attribute Summary collapse
-
#message_id ⇒ Object
readonly
Returns the value of attribute message_id.
Attributes inherited from BaseEvent
Instance Method Summary collapse
-
#initialize(message_id:, timestamp: nil, raw_event: nil) ⇒ TextMessageEndEvent
constructor
A new instance of TextMessageEndEvent.
- #to_h ⇒ Object
Methods inherited from Types::Model
Constructor Details
#initialize(message_id:, timestamp: nil, raw_event: nil) ⇒ TextMessageEndEvent
Returns a new instance of TextMessageEndEvent.
193 194 195 196 |
# File 'lib/ag_ui_protocol/core/events.rb', line 193 def initialize(message_id:, timestamp: nil, raw_event: nil) super(type: EventType::TEXT_MESSAGE_END, timestamp: , raw_event: raw_event) @message_id = end |
Instance Attribute Details
#message_id ⇒ Object (readonly)
Returns the value of attribute message_id.
187 188 189 |
# File 'lib/ag_ui_protocol/core/events.rb', line 187 def @message_id end |
Instance Method Details
#to_h ⇒ Object
199 200 201 |
# File 'lib/ag_ui_protocol/core/events.rb', line 199 def to_h super.merge(message_id: @message_id) end |