Class: Riffer::StreamEvents::SkillActivation
- Defined in:
- lib/riffer/stream_events/skill_activation.rb
Overview
Emitted when a skill is activated during streaming, via the on_activate callback when the LLM calls the activation tool.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
The activated skill name.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(name, role: :system) ⇒ SkillActivation
constructor
– : (String, ?role: Symbol) -> void.
-
#to_h ⇒ Object
– : () -> Hash[Symbol, untyped].
Constructor Details
#initialize(name, role: :system) ⇒ SkillActivation
– : (String, ?role: Symbol) -> void
12 13 14 15 |
# File 'lib/riffer/stream_events/skill_activation.rb', line 12 def initialize(name, role: :system) super(role: role) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
The activated skill name.
8 9 10 |
# File 'lib/riffer/stream_events/skill_activation.rb', line 8 def name @name end |
Instance Method Details
#to_h ⇒ Object
– : () -> Hash[Symbol, untyped]
19 20 21 |
# File 'lib/riffer/stream_events/skill_activation.rb', line 19 def to_h {role: @role, name: @name} end |