Aller au contenu principal

Class: BaseEmbedding

Hierarchy

Constructors

constructor

new BaseEmbedding()

Methods

getQueryEmbedding

Abstract getQueryEmbedding(query): Promise<number[]>

Parameters

NameType
querystring

Returns

Promise<number[]>

Defined in

packages/core/src/embeddings/types.ts:23


getTextEmbedding

Abstract getTextEmbedding(text): Promise<number[]>

Parameters

NameType
textstring

Returns

Promise<number[]>

Defined in

packages/core/src/embeddings/types.ts:22


similarity

similarity(embedding1, embedding2, mode?): number

Parameters

NameTypeDefault value
embedding1number[]undefined
embedding2number[]undefined
modeSimilarityTypeSimilarityType.DEFAULT

Returns

number

Defined in

packages/core/src/embeddings/types.ts:14