Class: AgentSandbox::RubyLLMTools::ReadFile

Inherits:
Base
  • Object
show all
Defined in:
lib/agent_sandbox/ruby_llm_tools.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from AgentSandbox::RubyLLMTools::Base

Instance Method Details

#execute(path:) ⇒ Object



62
63
64
65
66
# File 'lib/agent_sandbox/ruby_llm_tools.rb', line 62

def execute(path:)
  { path: path, content: @sandbox.read_file(path) }
rescue AgentSandbox::Error => e
  { error: e.message }
end