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>

39 lines (36 loc) 1.67 kB
import { BaseVectorStore, VectorStoreBaseParams, VectorStoreQuery, VectorStoreQueryResult } from '@llamaindex/core/vector-store'; export * from '@llamaindex/core/vector-store'; import { BaseEmbedding } from '@llamaindex/core/embeddings'; import { BaseNode } from '@llamaindex/core/schema'; import { Logger } from '@llamaindex/env'; type MetadataValue = Record<string, any>; declare class SimpleVectorStoreData { embeddingDict: Record<string, number[]>; textIdToRefDocId: Record<string, string>; metadataDict: Record<string, MetadataValue>; } declare class SimpleVectorStore extends BaseVectorStore { storesText: boolean; private data; private persistPath; constructor(init?: { data?: SimpleVectorStoreData | undefined; } & VectorStoreBaseParams); static fromPersistDir(persistDir?: string, embedModel?: BaseEmbedding, options?: { logger?: Logger; }): Promise<SimpleVectorStore>; client(): null; get(textId: string): Promise<number[]>; add(embeddingResults: BaseNode[]): Promise<string[]>; delete(refDocId: string): Promise<void>; private filterNodes; query(query: VectorStoreQuery): Promise<VectorStoreQueryResult>; persist(persistPath?: string): Promise<void>; protected static persistData(persistPath: string, data: SimpleVectorStoreData): Promise<void>; static fromPersistPath(persistPath: string, embedModel?: BaseEmbedding, options?: { logger?: Logger; }): Promise<SimpleVectorStore>; static fromDict(saveDict: SimpleVectorStoreData, embedModel?: BaseEmbedding): SimpleVectorStore; toDict(): SimpleVectorStoreData; } export { SimpleVectorStore };