Class: AgUiProtocol::Core::Events::ThinkingTextMessageContentEvent
- Inherits:
-
BaseEvent
- Object
- Types::Model
- BaseEvent
- AgUiProtocol::Core::Events::ThinkingTextMessageContentEvent
- Defined in:
- lib/ag_ui_protocol/core/events.rb
Overview
Event indicating a piece of a thinking text message.
Instance Attribute Summary collapse
-
#delta ⇒ Object
readonly
Returns the value of attribute delta.
Attributes inherited from BaseEvent
Instance Method Summary collapse
-
#initialize(delta:, timestamp: nil, raw_event: nil) ⇒ ThinkingTextMessageContentEvent
constructor
A new instance of ThinkingTextMessageContentEvent.
- #to_h ⇒ Object
Methods inherited from Types::Model
Constructor Details
#initialize(delta:, timestamp: nil, raw_event: nil) ⇒ ThinkingTextMessageContentEvent
Returns a new instance of ThinkingTextMessageContentEvent.
281 282 283 284 285 286 |
# File 'lib/ag_ui_protocol/core/events.rb', line 281 def initialize(delta:, timestamp: nil, raw_event: nil) raise ArgumentError, "delta must be non-empty" if delta.nil? || delta.empty? super(type: EventType::THINKING_TEXT_MESSAGE_CONTENT, timestamp: , raw_event: raw_event) @delta = delta end |
Instance Attribute Details
#delta ⇒ Object (readonly)
Returns the value of attribute delta.
275 276 277 |
# File 'lib/ag_ui_protocol/core/events.rb', line 275 def delta @delta end |
Instance Method Details
#to_h ⇒ Object
289 290 291 |
# File 'lib/ag_ui_protocol/core/events.rb', line 289 def to_h super.merge(delta: @delta) end |