class Riffer::StreamEvents::GuardrailModification
rbs_inline: enabled
Attributes
Public Class Methods
Source
# File lib/riffer/stream_events/guardrail_modification.rb, line 9 def initialize(modification, role: :assistant) super(role: role) @modification = modification end
Calls superclass method
Riffer::StreamEvents::Base::new
Public Instance Methods
Source
# File lib/riffer/stream_events/guardrail_modification.rb, line 16 def guardrail = modification.guardrail #-- #: () -> Symbol def phase = modification.phase #-- #: () -> Array[Integer] def message_indices = modification.message_indices #-- #: () -> Hash[Symbol, untyped] def to_h { role: @role, modification: modification.to_h }
Source
# File lib/riffer/stream_events/guardrail_modification.rb, line 24 def message_indices = modification.message_indices #-- #: () -> Hash[Symbol, untyped] def to_h { role: @role, modification: modification.to_h } end end
Source
# File lib/riffer/stream_events/guardrail_modification.rb, line 20 def phase = modification.phase #-- #: () -> Array[Integer] def message_indices = modification.message_indices #-- #: () -> Hash[Symbol, untyped] def to_h { role: @role, modification: modification.to_h } end
Source
# File lib/riffer/stream_events/guardrail_modification.rb, line 28 def to_h { role: @role, modification: modification.to_h } end