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.
121 122 123 124 |
# File 'lib/silas/engines/ruby_llm.rb', line 121 def initialize(definition) super() @definition = definition end |
Instance Method Details
#description ⇒ Object
127 |
# File 'lib/silas/engines/ruby_llm.rb', line 127 def description = @definition["description"] |
#execute ⇒ Object
130 131 132 |
# File 'lib/silas/engines/ruby_llm.rb', line 130 def execute(**) ::RubyLLM::Tool::Halt.new(INTERCEPTED) end |
#name ⇒ Object
126 |
# File 'lib/silas/engines/ruby_llm.rb', line 126 def name = @definition["name"] |
#params_schema ⇒ Object
128 |
# File 'lib/silas/engines/ruby_llm.rb', line 128 def params_schema = @definition["input_schema"] |