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/vector-store/SimpleVectorStore.ts:131

Properties

embedModel

embedModel: BaseEmbedding

Inherited from

VectorStoreBase.embedModel

Defined in

packages/llamaindex/src/vector-store/types.ts:104


storesText

storesText: boolean = false

Implementation of

VectorStoreNoEmbedModel.storesText

Defined in

packages/llamaindex/src/vector-store/SimpleVectorStore.ts:127

Accessors

client

get client(): any

Returns

any

Implementation of

VectorStoreNoEmbedModel.client

Defined in

packages/llamaindex/src/vector-store/SimpleVectorStore.ts:147

Methods

add()

add(embeddingResults): Promise<string[]>

Parameters

embeddingResults: BaseNode<Metadata>[]

Returns

Promise<string[]>

Implementation of

VectorStoreNoEmbedModel.add

Defined in

packages/llamaindex/src/vector-store/SimpleVectorStore.ts:155


delete()

delete(refDocId): Promise<void>

Parameters

refDocId: string

Returns

Promise<void>

Implementation of

VectorStoreNoEmbedModel.delete

Defined in

packages/llamaindex/src/vector-store/SimpleVectorStore.ts:178


get()

get(textId): Promise<number[]>

Parameters

textId: string

Returns

Promise<number[]>

Defined in

packages/llamaindex/src/vector-store/SimpleVectorStore.ts:151


persist()

persist(persistPath): Promise<void>

Parameters

persistPath: string = ...

Returns

Promise<void>

Defined in

packages/llamaindex/src/vector-store/SimpleVectorStore.ts:255


query()

query(query): Promise<VectorStoreQueryResult>

Parameters

query: VectorStoreQuery

Returns

Promise<VectorStoreQueryResult>

Implementation of

VectorStoreNoEmbedModel.query

Defined in

packages/llamaindex/src/vector-store/SimpleVectorStore.ts:218


toDict()

toDict(): SimpleVectorStoreData

Returns

SimpleVectorStoreData

Defined in

packages/llamaindex/src/vector-store/SimpleVectorStore.ts:317


fromDict()

static fromDict(saveDict, embedModel?): SimpleVectorStore

Parameters

saveDict: SimpleVectorStoreData

embedModel?: BaseEmbedding

Returns

SimpleVectorStore

Defined in

packages/llamaindex/src/vector-store/SimpleVectorStore.ts:306


fromPersistDir()

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

Parameters

persistDir: string = DEFAULT_PERSIST_DIR

embedModel?: BaseEmbedding

Returns

Promise<SimpleVectorStore>

Defined in

packages/llamaindex/src/vector-store/SimpleVectorStore.ts:139


fromPersistPath()

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

Parameters

persistPath: string

embedModel?: BaseEmbedding

Returns

Promise<SimpleVectorStore>

Defined in

packages/llamaindex/src/vector-store/SimpleVectorStore.ts:273


persistData()

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

Parameters

persistPath: string

data: SimpleVectorStoreData

Returns

Promise<void>

Defined in

packages/llamaindex/src/vector-store/SimpleVectorStore.ts:261