Skip to main content

Class: MistralTextEmbeddingModel

Hierarchy

Implements

Accessors

modelInformation

get modelInformation(): ModelInformation

Returns

ModelInformation

Implementation of

EmbeddingModel.modelInformation

Inherited from

AbstractModel.modelInformation

Defined in

packages/modelfusion/src/model-function/AbstractModel.ts:17


modelName

get modelName(): "mistral-embed"

Returns

"mistral-embed"

Overrides

AbstractModel.modelName

Defined in

packages/modelfusion/src/model-provider/mistral/MistralTextEmbeddingModel.ts:44


settingsForEvent

get settingsForEvent(): Partial<MistralTextEmbeddingModelSettings>

Returns settings that should be recorded in observability events. Security-related settings (e.g. API keys) should not be included here.

Returns

Partial<MistralTextEmbeddingModelSettings>

Implementation of

EmbeddingModel.settingsForEvent

Overrides

AbstractModel.settingsForEvent

Defined in

packages/modelfusion/src/model-provider/mistral/MistralTextEmbeddingModel.ts:99

Constructors

constructor

new MistralTextEmbeddingModel(settings): MistralTextEmbeddingModel

Parameters

NameType
settingsMistralTextEmbeddingModelSettings

Returns

MistralTextEmbeddingModel

Overrides

AbstractModel&lt;MistralTextEmbeddingModelSettings&gt;.constructor

Defined in

packages/modelfusion/src/model-provider/mistral/MistralTextEmbeddingModel.ts:39

Methods

callAPI

callAPI(texts, callOptions): Promise<{ data: { embedding: number[] ; index: number ; object: string }[] ; id: string ; model: string ; object: string ; usage: { prompt_tokens: number ; total_tokens: number } }>

Parameters

NameType
textsstring[]
callOptionsFunctionCallOptions

Returns

Promise<{ data: { embedding: number[] ; index: number ; object: string }[] ; id: string ; model: string ; object: string ; usage: { prompt_tokens: number ; total_tokens: number } }>

Defined in

packages/modelfusion/src/model-provider/mistral/MistralTextEmbeddingModel.ts:58


doEmbedValues

doEmbedValues(texts, options): Promise<{ embeddings: number[][] ; rawResponse: { data: { embedding: number[] ; index: number ; object: string }[] ; id: string ; model: string ; object: string ; usage: { prompt_tokens: number ; total_tokens: number } } }>

Parameters

NameType
textsstring[]
optionsFunctionCallOptions

Returns

Promise<{ embeddings: number[][] ; rawResponse: { data: { embedding: number[] ; index: number ; object: string }[] ; id: string ; model: string ; object: string ; usage: { prompt_tokens: number ; total_tokens: number } } }>

Implementation of

EmbeddingModel.doEmbedValues

Defined in

packages/modelfusion/src/model-provider/mistral/MistralTextEmbeddingModel.ts:105


withSettings

withSettings(additionalSettings): MistralTextEmbeddingModel

The withSettings method creates a new model with the same configuration as the original model, but with the specified settings changed.

Parameters

NameType
additionalSettingsPartial<MistralTextEmbeddingModelSettings>

Returns

MistralTextEmbeddingModel

Example

const model = new OpenAICompletionModel({
model: "gpt-3.5-turbo-instruct",
maxGenerationTokens: 500,
});

const modelWithMoreTokens = model.withSettings({
maxGenerationTokens: 1000,
});

Implementation of

EmbeddingModel.withSettings

Overrides

AbstractModel.withSettings

Defined in

packages/modelfusion/src/model-provider/mistral/MistralTextEmbeddingModel.ts:114

Properties

dimensions

Readonly dimensions: 1024

The size of the embedding vector.

Implementation of

EmbeddingModel.dimensions

Defined in

packages/modelfusion/src/model-provider/mistral/MistralTextEmbeddingModel.ts:56


isParallelizable

Readonly isParallelizable: false

Parallel calls are technically possible, but I have been hitting rate limits and disabled them for now.

Implementation of

EmbeddingModel.isParallelizable

Defined in

packages/modelfusion/src/model-provider/mistral/MistralTextEmbeddingModel.ts:54


maxValuesPerCall

Readonly maxValuesPerCall: 32

Limit of how many values can be sent in a single API call.

Implementation of

EmbeddingModel.maxValuesPerCall

Defined in

packages/modelfusion/src/model-provider/mistral/MistralTextEmbeddingModel.ts:48


provider

Readonly provider: "mistral"

Overrides

AbstractModel.provider

Defined in

packages/modelfusion/src/model-provider/mistral/MistralTextEmbeddingModel.ts:43


settings

Readonly settings: MistralTextEmbeddingModelSettings

Implementation of

EmbeddingModel.settings

Inherited from

AbstractModel.settings

Defined in

packages/modelfusion/src/model-function/AbstractModel.ts:7