Mistral

Parameters for MistralEmbedder, which embeds documents with Mistral AI embedding models.

Mistral Embedder embeds documents using Mistral AI's embedding models.

Parameters

ParameterTypeDescriptionDefault
idstrThe model ID to use for embeddings"mistral-embed"
dimensionsintOutput dimensions of the embedding1024
request_paramsOptional[Dict[str, Any]]Additional parameters for embedding requestsNone
api_keyOptional[str]Mistral API keyEnvironment variable MISTRAL_API_KEY
endpointOptional[str]Legacy adapter option; leave None with the current Mistral SDK (see below)None
max_retriesOptional[int]Legacy adapter option; leave None with the current Mistral SDK (see below)None
timeoutOptional[int]Request timeout in seconds; converted to the SDK timeout_ms valueNone
client_paramsOptional[Dict[str, Any]]Additional parameters for client initializationNone
mistral_clientOptional[Mistral]Pre-configured Mistral clientNone
enable_batchboolEmbed multiple texts per API call when adding content to vector databasesFalse
batch_sizeintNumber of texts per batch when enable_batch is True100

With mistralai 2.9.4, non-None endpoint and max_retries values cause client construction to raise TypeError: the adapter forwards names the SDK does not accept. Leave both unset. To customize the endpoint or retries, pass the SDK's server_url and retry_config through client_params, or inject a configured mistral_client. See the Mistral Python SDK for RetryConfig and client configuration.