跳到主要内容

Reader / Loader

LlamaIndex.TS supports easy loading of files from folders using the SimpleDirectoryReader class. Currently, .txt, .pdf, .csv, .md and .docx files are supported, with more planned in the future!

import { SimpleDirectoryReader } from "llamaindex";

documents = new SimpleDirectoryReader().loadData("./data");

API Reference