Aller au contenu principal

Class: TogetherEmbedding

Hierarchy

Constructors

constructor

new TogetherEmbedding(init?)

Parameters

NameType
init?Partial<OpenAIEmbedding>

Overrides

OpenAIEmbedding.constructor

Defined in

packages/core/src/embeddings/together.ts:5

Properties

additionalSessionOptions

Optional additionalSessionOptions: Omit<Partial<ClientOptions>, "apiKey" | "timeout" | "maxRetries">

Inherited from

OpenAIEmbedding.additionalSessionOptions

Defined in

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


apiKey

Optional apiKey: string = undefined

Inherited from

OpenAIEmbedding.apiKey

Defined in

packages/core/src/embeddings/OpenAIEmbedding.ts:20


maxRetries

maxRetries: number

Inherited from

OpenAIEmbedding.maxRetries

Defined in

packages/core/src/embeddings/OpenAIEmbedding.ts:21


model

model: string

Overrides

OpenAIEmbedding.model

Defined in

packages/core/src/embeddings/together.ts:4


session

session: OpenAISession

Inherited from

OpenAIEmbedding.session

Defined in

packages/core/src/embeddings/OpenAIEmbedding.ts:28


timeout

Optional timeout: number

Inherited from

OpenAIEmbedding.timeout

Defined in

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

Methods

getQueryEmbedding

getQueryEmbedding(query): Promise<number[]>

Parameters

NameType
querystring

Returns

Promise<number[]>

Inherited from

OpenAIEmbedding.getQueryEmbedding

Defined in

packages/core/src/embeddings/OpenAIEmbedding.ts:89


getTextEmbedding

getTextEmbedding(text): Promise<number[]>

Parameters

NameType
textstring

Returns

Promise<number[]>

Inherited from

OpenAIEmbedding.getTextEmbedding

Defined in

packages/core/src/embeddings/OpenAIEmbedding.ts:85


similarity

similarity(embedding1, embedding2, mode?): number

Parameters

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

Returns

number

Inherited from

OpenAIEmbedding.similarity

Defined in

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