Skip to main content

Class: SimpleVectorStore

Extends

Implements

Constructors

new SimpleVectorStore()

new SimpleVectorStore(init?): SimpleVectorStore

Parameters

init?: object & Partial <IEmbedModel>

Returns

SimpleVectorStore

Overrides

VectorStoreBase . constructor

Source

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

Properties

data

private data: SimpleVectorStoreData

Source

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


embedModel

embedModel: BaseEmbedding

Inherited from

VectorStoreBase . embedModel

Source

packages/core/src/storage/vectorStore/types.ts:86


persistPath

private persistPath: undefined | string

Source

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


storesText

storesText: boolean = false

Implementation of

VectorStoreNoEmbedModel . storesText

Source

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

Accessors

client

get client(): any

Returns

any

Source

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

Methods

add()

add(embeddingResults): Promise<string[]>

Parameters

embeddingResults: BaseNode <Metadata>[]

Returns

Promise<string[]>

Implementation of

VectorStoreNoEmbedModel . add

Source

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


delete()

delete(refDocId): Promise<void>

Parameters

refDocId: string

Returns

Promise<void>

Implementation of

VectorStoreNoEmbedModel . delete

Source

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


get()

get(textId): Promise<number[]>

Parameters

textId: string

Returns

Promise<number[]>

Source

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


persist()

persist(persistPath): Promise<void>

Parameters

persistPath: string= undefined

Returns

Promise<void>

Source

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


query()

query(query): Promise <VectorStoreQueryResult>

Parameters

query: VectorStoreQuery

Returns

Promise <VectorStoreQueryResult>

Implementation of

VectorStoreNoEmbedModel . query

Source

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


toDict()

toDict(): SimpleVectorStoreData

Returns

SimpleVectorStoreData

Source

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


fromDict()

static fromDict(saveDict, embedModel?): SimpleVectorStore

Parameters

saveDict: SimpleVectorStoreData

embedModel?: BaseEmbedding

Returns

SimpleVectorStore

Source

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


fromPersistDir()

static fromPersistDir(persistDir, embedModel?): Promise <SimpleVectorStore>

Parameters

persistDir: string= DEFAULT_PERSIST_DIR

embedModel?: BaseEmbedding

Returns

Promise <SimpleVectorStore>

Source

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


fromPersistPath()

static fromPersistPath(persistPath, embedModel?): Promise <SimpleVectorStore>

Parameters

persistPath: string

embedModel?: BaseEmbedding

Returns

Promise <SimpleVectorStore>

Source

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


persistData()

static protected persistData(persistPath, data): Promise<void>

Parameters

persistPath: string

data: SimpleVectorStoreData

Returns

Promise<void>

Source

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