Skip to main content

Class: SimpleVectorStore

Extends

Implements

Constructors

new SimpleVectorStore()

new SimpleVectorStore(init?): SimpleVectorStore

Parameters

init?

init.data?: SimpleVectorStoreData

init.embedModel?: BaseEmbedding

Returns

SimpleVectorStore

Overrides

VectorStoreBase.constructor

Defined in

packages/llamaindex/src/storage/vectorStore/SimpleVectorStore.ts:134

Properties

embedModel

embedModel: BaseEmbedding

Inherited from

VectorStoreBase.embedModel

Defined in

packages/llamaindex/src/storage/vectorStore/types.ts:104


storesText

storesText: boolean = false

Implementation of

VectorStoreNoEmbedModel.storesText

Defined in

packages/llamaindex/src/storage/vectorStore/SimpleVectorStore.ts:130

Accessors

client

get client(): any

Returns

any

Implementation of

VectorStoreNoEmbedModel.client

Defined in

packages/llamaindex/src/storage/vectorStore/SimpleVectorStore.ts:150

Methods

add()

add(embeddingResults): Promise<string[]>

Parameters

embeddingResults: BaseNode<Metadata>[]

Returns

Promise<string[]>

Implementation of

VectorStoreNoEmbedModel.add

Defined in

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


delete()

delete(refDocId): Promise<void>

Parameters

refDocId: string

Returns

Promise<void>

Implementation of

VectorStoreNoEmbedModel.delete

Defined in

packages/llamaindex/src/storage/vectorStore/SimpleVectorStore.ts:181


get()

get(textId): Promise<number[]>

Parameters

textId: string

Returns

Promise<number[]>

Defined in

packages/llamaindex/src/storage/vectorStore/SimpleVectorStore.ts:154


persist()

persist(persistPath): Promise<void>

Parameters

persistPath: string = ...

Returns

Promise<void>

Defined in

packages/llamaindex/src/storage/vectorStore/SimpleVectorStore.ts:258


query()

query(query): Promise<VectorStoreQueryResult>

Parameters

query: VectorStoreQuery

Returns

Promise<VectorStoreQueryResult>

Implementation of

VectorStoreNoEmbedModel.query

Defined in

packages/llamaindex/src/storage/vectorStore/SimpleVectorStore.ts:221


toDict()

toDict(): SimpleVectorStoreData

Returns

SimpleVectorStoreData

Defined in

packages/llamaindex/src/storage/vectorStore/SimpleVectorStore.ts:320


fromDict()

static fromDict(saveDict, embedModel?): SimpleVectorStore

Parameters

saveDict: SimpleVectorStoreData

embedModel?: BaseEmbedding

Returns

SimpleVectorStore

Defined in

packages/llamaindex/src/storage/vectorStore/SimpleVectorStore.ts:309


fromPersistDir()

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

Parameters

persistDir: string = DEFAULT_PERSIST_DIR

embedModel?: BaseEmbedding

Returns

Promise<SimpleVectorStore>

Defined in

packages/llamaindex/src/storage/vectorStore/SimpleVectorStore.ts:142


fromPersistPath()

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

Parameters

persistPath: string

embedModel?: BaseEmbedding

Returns

Promise<SimpleVectorStore>

Defined in

packages/llamaindex/src/storage/vectorStore/SimpleVectorStore.ts:276


persistData()

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

Parameters

persistPath: string

data: SimpleVectorStoreData

Returns

Promise<void>

Defined in

packages/llamaindex/src/storage/vectorStore/SimpleVectorStore.ts:264