Class: Silas::Engines::RubyLLM::HaltProxy

Inherits:
RubyLLM::Tool
  • Object
show all
Defined in:
lib/silas/engines/ruby_llm.rb

Overview

Presents an Silas tool schema to RubyLLM; halts instead of executing.

Instance Method Summary collapse

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

#descriptionObject



127
# File 'lib/silas/engines/ruby_llm.rb', line 127

def description = @definition["description"]

#executeObject



130
131
132
# File 'lib/silas/engines/ruby_llm.rb', line 130

def execute(**)
  ::RubyLLM::Tool::Halt.new(INTERCEPTED)
end

#nameObject



126
# File 'lib/silas/engines/ruby_llm.rb', line 126

def name = @definition["name"]

#params_schemaObject



128
# File 'lib/silas/engines/ruby_llm.rb', line 128

def params_schema = @definition["input_schema"]