Pular para o conteúdo principal

Class: SimpleVectorStore

Implements

Constructors

new SimpleVectorStore()

new SimpleVectorStore(data?, fs?): SimpleVectorStore

Parameters

data?: SimpleVectorStoreData

fs?: GenericFileSystem

Returns

SimpleVectorStore

Source

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:38

Properties

data

private data: SimpleVectorStoreData

Source

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:34


fs

private fs: GenericFileSystem = defaultFS

Source

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:35


persistPath

private persistPath: undefined | string

Source

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:36


storesText

storesText: boolean = false

Implementation of

VectorStore . storesText

Source

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:33

Accessors

client

get client(): any

Returns

any

Source

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:51

Methods

add()

add(embeddingResults): Promise<string[]>

Parameters

embeddingResults: BaseNode <Metadata>[]

Returns

Promise<string[]>

Implementation of

VectorStore . add

Source

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:59


delete()

delete(refDocId): Promise<void>

Parameters

refDocId: string

Returns

Promise<void>

Implementation of

VectorStore . delete

Source

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:77


get()

get(textId): Promise<number[]>

Parameters

textId: string

Returns

Promise<number[]>

Source

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:55


persist()

persist(persistPath, fs?): Promise<void>

Parameters

persistPath: string= undefined

fs?: GenericFileSystem

Returns

Promise<void>

Source

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:149


query()

query(query): Promise <VectorStoreQueryResult>

Parameters

query: VectorStoreQuery

Returns

Promise <VectorStoreQueryResult>

Implementation of

VectorStore . query

Source

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:91


toDict()

toDict(): SimpleVectorStoreData

Returns

SimpleVectorStoreData

Source

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:197


fromDict()

static fromDict(saveDict): SimpleVectorStore

Parameters

saveDict: SimpleVectorStoreData

Returns

SimpleVectorStore

Source

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:190


fromPersistDir()

static fromPersistDir(persistDir, fs): Promise <SimpleVectorStore>

Parameters

persistDir: string= DEFAULT_PERSIST_DIR

fs: GenericFileSystem= defaultFS

Returns

Promise <SimpleVectorStore>

Source

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:43


fromPersistPath()

static fromPersistPath(persistPath, fs): Promise <SimpleVectorStore>

Parameters

persistPath: string

fs: GenericFileSystem= defaultFS

Returns

Promise <SimpleVectorStore>

Source

packages/core/src/storage/vectorStore/SimpleVectorStore.ts:162