Class: Riffer::StreamEvents::ReasoningDone

Inherits:
Base
  • Object
show all
Defined in:
lib/riffer/stream_events/reasoning_done.rb,
sig/generated/riffer/stream_events/reasoning_done.rbs

Overview

Represents completed reasoning during streaming; only emitted by providers that support reasoning (e.g. OpenAI with the reasoning option).

Instance Attribute Summary collapse

Attributes inherited from Base

#role

Instance Method Summary collapse

Constructor Details

#initialize(content, role: :assistant) ⇒ ReasoningDone

-- : (String, ?role: Symbol) -> void

Parameters:

  • (String)
  • role: (Symbol) (defaults to: :assistant)


12
13
14
15
# File 'lib/riffer/stream_events/reasoning_done.rb', line 12

def initialize(content, role: :assistant)
  super(role: role)
  @content = content
end

Instance Attribute Details

#contentString (readonly)

The complete reasoning content.

Returns:

  • (String)


8
9
10
# File 'lib/riffer/stream_events/reasoning_done.rb', line 8

def content
  @content
end

Instance Method Details

#to_hHash[Symbol, untyped]

-- : () -> Hash[Symbol, untyped]

Returns:

  • (Hash[Symbol, untyped])


19
20
21
# File 'lib/riffer/stream_events/reasoning_done.rb', line 19

def to_h
  {role: @role, content: @content}
end