Class: Silas::Engines::RubyLLM::HaltProxy
- Inherits:
-
RubyLLM::Tool
- Object
- RubyLLM::Tool
- Silas::Engines::RubyLLM::HaltProxy
- Defined in:
- lib/silas/engines/ruby_llm.rb
Overview
Presents an Silas tool schema to RubyLLM; halts instead of executing.
Instance Method Summary collapse
- #description ⇒ Object
- #execute ⇒ Object
-
#initialize(definition) ⇒ HaltProxy
constructor
A new instance of HaltProxy.
- #name ⇒ Object
- #params_schema ⇒ Object
Constructor Details
#initialize(definition) ⇒ HaltProxy
Returns a new instance of HaltProxy.
128 129 130 131 |
# File 'lib/silas/engines/ruby_llm.rb', line 128 def initialize(definition) super() @definition = definition end |
Instance Method Details
#description ⇒ Object
134 |
# File 'lib/silas/engines/ruby_llm.rb', line 134 def description = @definition["description"] |
#execute ⇒ Object
137 138 139 |
# File 'lib/silas/engines/ruby_llm.rb', line 137 def execute(**) ::RubyLLM::Tool::Halt.new(INTERCEPTED) end |
#name ⇒ Object
133 |
# File 'lib/silas/engines/ruby_llm.rb', line 133 def name = @definition["name"] |
#params_schema ⇒ Object
135 |
# File 'lib/silas/engines/ruby_llm.rb', line 135 def params_schema = @definition["input_schema"] |