Class: MistralTextEmbeddingModel
Hierarchy
-
AbstractModel
<MistralTextEmbeddingModelSettings
>↳
MistralTextEmbeddingModel
Implements
Accessors
modelInformation
• get
modelInformation(): ModelInformation
Returns
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
Name | Type |
---|---|
settings | MistralTextEmbeddingModelSettings |
Returns
Overrides
AbstractModel<MistralTextEmbeddingModelSettings>.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
Name | Type |
---|---|
texts | string [] |
callOptions | FunctionCallOptions |
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
Name | Type |
---|---|
texts | string [] |
options | FunctionCallOptions |
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
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
Name | Type |
---|---|
additionalSettings | Partial <MistralTextEmbeddingModelSettings > |
Returns
Example
const model = new OpenAICompletionModel({
model: "gpt-3.5-turbo-instruct",
maxGenerationTokens: 500,
});
const modelWithMoreTokens = model.withSettings({
maxGenerationTokens: 1000,
});
Implementation of
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
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
Inherited from
AbstractModel.settings