Module: LLM::Tool::Patch
- Included in:
- LLM::Tool
- Defined in:
- lib/llm/shell/tool.rb
Instance Method Summary collapse
- #builtin? ⇒ Boolean
-
#disable! ⇒ void
Disable the tool.
-
#enable! ⇒ void
Enable the tool.
-
#enabled? ⇒ Boolean
Returns true for an enabled tool.
Instance Method Details
#builtin? ⇒ Boolean
28 29 30 31 |
# File 'lib/llm/shell/tool.rb', line 28 def builtin? path, _ = instance_method(:call).source_location path&.include?(LLM::Shell.root) end |
#disable! ⇒ void
This method returns an undefined value.
Disable the tool
22 23 24 |
# File 'lib/llm/shell/tool.rb', line 22 def disable! @enabled = false end |
#enable! ⇒ void
This method returns an undefined value.
Enable the tool
15 16 17 |
# File 'lib/llm/shell/tool.rb', line 15 def enable! @enabled = true end |
#enabled? ⇒ Boolean
Returns true for an enabled tool
8 9 10 |
# File 'lib/llm/shell/tool.rb', line 8 def enabled? @enabled end |