Class: Riffer::StreamEvents::SkillActivation
- Defined in:
- lib/riffer/stream_events/skill_activation.rb
Overview
Emitted when a skill is activated during streaming.
Fired by the on_activate callback on Riffer::Skills::Context when the LLM calls the skill 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
14 15 16 17 |
# File 'lib/riffer/stream_events/skill_activation.rb', line 14 def initialize(name, role: :system) super(role: role) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
The activated skill name.
10 11 12 |
# File 'lib/riffer/stream_events/skill_activation.rb', line 10 def name @name end |
Instance Method Details
#to_h ⇒ Object
– : () -> Hash[Symbol, untyped]
21 22 23 |
# File 'lib/riffer/stream_events/skill_activation.rb', line 21 def to_h {role: @role, name: @name} end |