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.



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

def initialize(definition)
  super()
  @definition = definition
end

Instance Method Details

#descriptionObject



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

def description = @definition["description"]

#executeObject



137
138
139
# File 'lib/silas/engines/ruby_llm.rb', line 137

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

#nameObject



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

def name = @definition["name"]

#params_schemaObject



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

def params_schema = @definition["input_schema"]