Expand description
File loading utilities for preparing local documents as model or embedding input.
FileLoader provides a common interface for reading files from disk, glob
matches, directories, or in-memory bytes. It can return content alone or pair
content with source paths, and it can optionally skip per-file errors.
PdfFileLoader is available with the pdf feature. It loads PDFs and can
split extracted text by page while preserving page numbers.
EpubFileLoader is available with the epub feature. It loads EPUB files
and can split extracted text by chapter while preserving chapter numbers.
Modules§
Structs§
- File
Loader - FileLoader is a utility for loading files from the filesystem using glob patterns or directory paths. It provides methods to read file contents and handle errors gracefully.