Class: LLM::Shell::Tools::ReadFile
- Inherits:
-
Tool
- Object
- Tool
- LLM::Shell::Tools::ReadFile
show all
- Defined in:
- lib/llm/shell/tools/read_file.rb
Instance Method Summary
collapse
Methods inherited from Tool
description, function, inherited, lock, name, params
#builtin?, #disable!, #enable!, #enabled?
#param
Instance Method Details
#call(path:) ⇒ Object
9
10
11
12
13
|
# File 'lib/llm/shell/tools/read_file.rb', line 9
def call(path:)
{ok: true, content: File.read(path)}
rescue => ex
{ok: false, error: {class: ex.class.to_s, message: ex.message}}
end
|