class Riffer::StreamEvents::TextDone
Represents completion of text generation during streaming.
Emitted when the LLM has finished producing text content.
Attributes
The complete text content.
Public Class Methods
Source
# File lib/riffer/stream_events/text_done.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_done.rb, line 18 def to_h {role: @role, content: @content} end
: () -> Hash[Symbol, untyped]