Skip to main content

Class: SimpleVectorStore

Extends

Constructors

new SimpleVectorStore()

new SimpleVectorStore(init?): SimpleVectorStore

Parameters

init?: object & VectorStoreBaseParams

Returns

SimpleVectorStore

Overrides

BaseVectorStore.constructor

Defined in

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

Properties

embedModel

embedModel: BaseEmbedding

Inherited from

BaseVectorStore.embedModel

Defined in

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


isEmbeddingQuery?

optional isEmbeddingQuery: boolean

Inherited from

BaseVectorStore.isEmbeddingQuery

Defined in

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


storesText

storesText: boolean = false

Overrides

BaseVectorStore.storesText

Defined in

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

Methods

add()

add(embeddingResults): Promise<string[]>

Parameters

embeddingResults: BaseNode<Metadata>[]

Returns

Promise<string[]>

Overrides

BaseVectorStore.add

Defined in

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


client()

client(): any

Returns

any

Overrides

BaseVectorStore.client

Defined in

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


delete()

delete(refDocId): Promise<void>

Parameters

refDocId: string

Returns

Promise<void>

Overrides

BaseVectorStore.delete

Defined in

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


get()

get(textId): Promise<number[]>

Parameters

textId: string

Returns

Promise<number[]>

Defined in

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


persist()

persist(persistPath): Promise<void>

Parameters

persistPath: string = ...

Returns

Promise<void>

Defined in

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


query()

query(query): Promise<VectorStoreQueryResult>

Parameters

query: VectorStoreQuery

Returns

Promise<VectorStoreQueryResult>

Overrides

BaseVectorStore.query

Defined in

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


toDict()

toDict(): SimpleVectorStoreData

Returns

SimpleVectorStoreData

Defined in

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


fromDict()

static fromDict(saveDict, embeddingModel?): SimpleVectorStore

Parameters

saveDict: SimpleVectorStoreData

embeddingModel?: BaseEmbedding

Returns

SimpleVectorStore

Defined in

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


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


fromPersistPath()

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

Parameters

persistPath: string

embeddingModel?: BaseEmbedding

Returns

Promise<SimpleVectorStore>

Defined in

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


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