Class: LLM::Shell::Tools::ReadFile
- Defined in:
- lib/llm/shell/tools/read_file.rb
Instance Method Summary collapse
Methods inherited from Tool
description, function, inherited, lock, name, params
Methods included from Tool::Patch
#builtin?, #disable!, #enable!, #enabled?
Methods included from Tool::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.}} end |