defaultLoaderMap property
Default loader map with common file type loaders.
Provides out-of-the-box support for:
- Plain text files (
.txt) - JSON files (
.json) - uses root schema - CSV and TSV files (
.csv,.tsv)
Can be extended or overridden when creating a DirectoryLoader.
Implementation
static Map<String, BaseDocumentLoader Function(String)> defaultLoaderMap = {
'.txt': TextLoader.new,
'.json': (path) => JsonLoader(path, jpSchema: r'$'),
'.csv': CsvLoader.new,
'.tsv': CsvLoader.new,
};