UNPKG

llamaindex

Version:

<p align="center"> <img height="100" width="100" alt="LlamaIndex logo" src="https://ts.llamaindex.ai/square.svg" /> </p> <h1 align="center">LlamaIndex.TS</h1> <h3 align="center"> Data framework for your LLM application. </h3>

30 lines (29 loc) 1.66 kB
import type { BaseReader, TransformComponent } from "@llamaindex/core/schema"; import { type BaseNode, type Document, type Metadata } from "@llamaindex/core/schema"; import type { BaseDocumentStore } from "@llamaindex/core/storage/doc-store"; import type { BaseVectorStore, VectorStoreByType } from "@llamaindex/core/vector-store"; import { IngestionCache } from "./IngestionCache.js"; import { DocStoreStrategy } from "./strategies/index.js"; type TransformRunArgs = { inPlace?: boolean; cache?: IngestionCache; docStoreStrategy?: TransformComponent; }; export declare function runTransformations(nodesToRun: BaseNode[], transformations: TransformComponent[], transformOptions?: any, { inPlace, cache, docStoreStrategy }?: TransformRunArgs): Promise<BaseNode[]>; export declare class IngestionPipeline { transformations: TransformComponent[]; documents?: Document[] | undefined; reader?: BaseReader | undefined; vectorStore?: BaseVectorStore | undefined; vectorStores?: VectorStoreByType | undefined; docStore?: BaseDocumentStore; docStoreStrategy: DocStoreStrategy; cache?: IngestionCache | undefined; disableCache: boolean; private _docStoreStrategy?; constructor(init?: Partial<IngestionPipeline>); prepareInput(documents?: Document[], nodes?: BaseNode[]): Promise<BaseNode[]>; run(args?: any, transformOptions?: any): Promise<BaseNode[]>; } export declare function addNodesToVectorStores(nodes: BaseNode<Metadata>[], vectorStores: VectorStoreByType, nodesAdded?: (newIds: string[], nodes: BaseNode<Metadata>[], vectorStore: BaseVectorStore) => Promise<void>): Promise<void>; export {};