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 12 def initialize(content, role: :assistant) super(role: role) @content = content end
: (String, ?role: Symbol) -> void
Calls superclass method
Riffer::StreamEvents::Base::new
Public Instance Methods
Source
# File lib/riffer/stream_events/text_delta.rb, line 18 def to_h {role: @role, content: @content} end
: () -> Hash[Symbol, untyped]