Skip to main content

Interface: VectorIndex<DATA, INDEX, FILTER>

Type parameters

Name
DATA
INDEX
FILTER

Implemented by

Methods

asIndex

asIndex(): INDEX

Returns

INDEX

Defined in

packages/modelfusion/src/vector-index/VectorIndex.ts:19


queryByVector

queryByVector(options): Promise<{ data: DATA ; id: string ; similarity?: number }[]>

Parameters

NameType
optionsObject
options.filter?FILTER
options.maxResultsnumber
options.queryVectorVector
options.similarityThreshold?number

Returns

Promise<{ data: DATA ; id: string ; similarity?: number }[]>

Defined in

packages/modelfusion/src/vector-index/VectorIndex.ts:12


upsertMany

upsertMany(data): Promise<void>

Parameters

NameType
data{ data: DATA ; id: string ; vector: Vector }[]

Returns

Promise<void>

Defined in

packages/modelfusion/src/vector-index/VectorIndex.ts:4