Class: RubyLLM::Toolbox::Sandbox::Null

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby_llm/toolbox/sandbox/base.rb

Overview

Used when no sandbox runtime is available; keeps the error path uniform.

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Base

#initialize, #name

Constructor Details

This class inherits a constructor from RubyLLM::Toolbox::Sandbox::Base

Instance Method Details

#available?Boolean

Returns:

  • (Boolean)


136
137
138
# File 'lib/ruby_llm/toolbox/sandbox/base.rb', line 136

def available?
  false
end

#command(argv, image: nil) ⇒ Object



145
146
147
# File 'lib/ruby_llm/toolbox/sandbox/base.rb', line 145

def command(argv, image: nil)
  Array(argv)
end

#run(_argv, stdin: nil, image: nil) ⇒ Object

Raises:



140
141
142
143
# File 'lib/ruby_llm/toolbox/sandbox/base.rb', line 140

def run(_argv, stdin: nil, image: nil)
  raise Unavailable,
        "no sandbox runtime available (need docker, or bubblewrap on Linux / sandbox-exec on macOS)"
end