メインコンテンツまでスキップ

Documents and Nodes

Documents and Nodes are the basic building blocks of any index. 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" } });

API Reference