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

Defined in

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

Properties

embedModel

embedModel: BaseEmbedding

Inherited from

VectorStoreBase.embedModel

Defined in

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


storesText

storesText: boolean = false

Implementation of

VectorStoreNoEmbedModel.storesText

Defined in

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

Accessors

client

get client(): any

Returns

any

Implementation of

VectorStoreNoEmbedModel.client

Defined in

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

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:159


delete()

delete(refDocId): Promise<void>

Parameters

refDocId: string

Returns

Promise<void>

Implementation of

VectorStoreNoEmbedModel.delete

Defined in

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


get()

get(textId): Promise<number[]>

Parameters

textId: string

Returns

Promise<number[]>

Defined in

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


persist()

persist(persistPath): Promise<void>

Parameters

persistPath: string = ...

Returns

Promise<void>

Defined in

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


query()

query(query): Promise<VectorStoreQueryResult>

Parameters

query: VectorStoreQuery

Returns

Promise<VectorStoreQueryResult>

Implementation of

VectorStoreNoEmbedModel.query

Defined in

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


toDict()

toDict(): SimpleVectorStoreData

Returns

SimpleVectorStoreData

Defined in

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


fromDict()

static fromDict(saveDict, embedModel?): SimpleVectorStore

Parameters

saveDict: SimpleVectorStoreData

embedModel?: BaseEmbedding

Returns

SimpleVectorStore

Defined in

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


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:143


fromPersistPath()

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

Parameters

persistPath: string

embedModel?: BaseEmbedding

Returns

Promise<SimpleVectorStore>

Defined in

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


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:265