Documents and Nodes
Data structure for storing data in LlamaIndex
Documents and Nodes are the basic building blocks of data in LlamaIndexTS. While the API for these objects is similar, Document objects represent entire files, while Nodes are smaller pieces of that original document, that are suitable for an LLM and Q&A.
import { Document } from "llamaindex";
document = new Document({ text: "text", metadata: { key: "val" } });