Module: Kodo::Tools::PromptContributor
- Included in:
- DismissReminder, FetchUrl, ForgetFact, ListReminders, RecallFacts, RememberFact, SetReminder, StoreSecret, UpdateFact, WebSearch
- Defined in:
- lib/kodo/tools/prompt_contributor.rb
Overview
Mixin for tool classes to declare prompt-level capability metadata.
Tools extend this module and use getter/setter class methods to
describe how they appear in the assembled system prompt.
class WebSearch < RubyLLM::Tool
extend PromptContributor
capability_name "Web Search"
capability_primary true
enabled_guidance "Search the web for current information."
end
Instance Method Summary collapse
- #capability_name(name = :__unset__) ⇒ Object
- #capability_primary(val = :__unset__) ⇒ Object
- #disabled_guidance(text = :__unset__) ⇒ Object
- #enabled_guidance(text = :__unset__) ⇒ Object
Instance Method Details
#capability_name(name = :__unset__) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/kodo/tools/prompt_contributor.rb', line 17 def capability_name(name = :__unset__) if name == :__unset__ @capability_name else @capability_name = name end end |
#capability_primary(val = :__unset__) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/kodo/tools/prompt_contributor.rb', line 25 def capability_primary(val = :__unset__) if val == :__unset__ @capability_primary || false else @capability_primary = val end end |
#disabled_guidance(text = :__unset__) ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/kodo/tools/prompt_contributor.rb', line 41 def disabled_guidance(text = :__unset__) if text == :__unset__ @disabled_guidance else @disabled_guidance = text end end |
#enabled_guidance(text = :__unset__) ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/kodo/tools/prompt_contributor.rb', line 33 def enabled_guidance(text = :__unset__) if text == :__unset__ @enabled_guidance else @enabled_guidance = text end end |