Class: Insika::Evals::Simulator::DryRunTool

Inherits:
Object
  • Object
show all
Defined in:
lib/insika/evals/simulator.rb

Overview

The dry-run fake lives with the Simulator (it is its "side_effect -> fake" convention). It answers the same surface as a RubyLLM tool (call) and never performs the real side effect. Its result carries dry_run: true so a reader can tell a swapped call from a real one in the transcript's tool trace.

Instance Method Summary collapse

Constructor Details

#initialize(name, description: nil) ⇒ DryRunTool

Returns a new instance of DryRunTool.



212
213
214
215
216
# File 'lib/insika/evals/simulator.rb', line 212

def initialize(name, description: nil)
  @name = name.to_s
  @description = description ||
                 "DRY-RUN of #{@name} — disabled for this simulated run, returns a canned envelope"
end

Instance Method Details

#call(args) ⇒ Object



221
222
223
224
# File 'lib/insika/evals/simulator.rb', line 221

def call(args)
  { "dry_run" => true, "tool" => @name, "simulated" => true,
    "note" => "side-effect tool disabled by the eval profile — the real call was NOT performed" }
end

#descriptionObject



219
# File 'lib/insika/evals/simulator.rb', line 219

def description = @description

#nameObject



218
# File 'lib/insika/evals/simulator.rb', line 218

def name = @name