Ana içeriğe geç

Class: BaseEmbedding

Hierarchy

Implements

Constructors

constructor

new BaseEmbedding(): BaseEmbedding

Returns

BaseEmbedding

Methods

getQueryEmbedding

getQueryEmbedding(query): Promise<number[]>

Parameters

NameType
querystring

Returns

Promise<number[]>

Defined in

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


getTextEmbedding

getTextEmbedding(text): Promise<number[]>

Parameters

NameType
textstring

Returns

Promise<number[]>

Defined in

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


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


transform

transform(nodes, _options?): Promise<BaseNode<Metadata>[]>

Parameters

NameType
nodesBaseNode<Metadata>[]
_options?any

Returns

Promise<BaseNode<Metadata>[]>

Implementation of

TransformComponent.transform

Defined in

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