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.
303 304 305 306 307 308 |
# File 'lib/ag_ui_protocol/core/events.rb', line 303 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.
297 298 299 |
# File 'lib/ag_ui_protocol/core/events.rb', line 297 def delta @delta end |
Instance Method Details
#to_h ⇒ Object
311 312 313 |
# File 'lib/ag_ui_protocol/core/events.rb', line 311 def to_h super.merge(delta: @delta) end |