Class: Riffer::StreamEvents::ReasoningDone
- Defined in:
- lib/riffer/stream_events/reasoning_done.rb
Overview
Represents completion of reasoning during streaming.
Emitted when the LLM has finished producing reasoning/thinking content. Only available with providers that support reasoning (e.g., OpenAI with reasoning option).
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
The complete reasoning content.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(content, role: :assistant) ⇒ ReasoningDone
constructor
: (String, ?role: Symbol) -> void.
-
#to_h ⇒ Object
: () -> Hash[Symbol, untyped].
Constructor Details
#initialize(content, role: :assistant) ⇒ ReasoningDone
: (String, ?role: Symbol) -> void
13 14 15 16 |
# File 'lib/riffer/stream_events/reasoning_done.rb', line 13 def initialize(content, role: :assistant) super(role: role) @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
The complete reasoning content.
10 11 12 |
# File 'lib/riffer/stream_events/reasoning_done.rb', line 10 def content @content end |
Instance Method Details
#to_h ⇒ Object
: () -> Hash[Symbol, untyped]
19 20 21 |
# File 'lib/riffer/stream_events/reasoning_done.rb', line 19 def to_h {role: @role, content: @content} end |