Class: Ask::RAG::Loader::Text
Overview
Loads a plain text file as a single document.
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#load(path) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/ask/rag/loader/text.rb', line 8 def load(path) content = File.read(path) [Ask::Document.new( content: content, metadata: { source: path } )] end |