class Riffer::StreamEvents::TextDelta
Represents an incremental text chunk during streaming.
Emitted when the LLM produces text content incrementally.
Attributes
The incremental text content.
Public Class Methods
Source
# File lib/riffer/stream_events/text_delta.rb, line 13 def initialize(content, role: :assistant) super(role: role) @content = content end
Calls superclass method
Riffer::StreamEvents::Base::new
Public Instance Methods
Source
# File lib/riffer/stream_events/text_delta.rb, line 20 def to_h {role: @role, content: @content} end