Method: Langchain::Tool::FileSystem#read_file
- Defined in:
- lib/langchain/tool/file_system.rb
permalink #read_file(file_path:) ⇒ Object
[View source]
32 33 34 35 36 |
# File 'lib/langchain/tool/file_system.rb', line 32 def read_file(file_path:) tool_response(content: File.read(file_path)) rescue Errno::ENOENT tool_response(content: "No such file: #{file_path}") end |