Class: Kward::Tools::ReadSkill
- Defined in:
- lib/kward/tools/read_skill.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #call(args, _conversation, cancellation: nil) ⇒ Object
-
#initialize ⇒ ReadSkill
constructor
A new instance of ReadSkill.
Methods inherited from Base
Constructor Details
#initialize ⇒ ReadSkill
Returns a new instance of ReadSkill.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/kward/tools/read_skill.rb', line 7 def initialize super( "read_skill", "Read configured skill instructions/files.", properties: { name: { type: "string", description: "Skill name." }, path: { type: "string", description: "Path inside skill; default SKILL.md." } }, required: ["name"] ) end |
Instance Method Details
#call(args, _conversation, cancellation: nil) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/kward/tools/read_skill.rb', line 19 def call(args, _conversation, cancellation: nil) name = argument(args, :name, "") path = argument(args, :path) ConfigFiles.read_skill_file(name, path) end |