Mistral
Parameters for MistralEmbedder, which embeds documents with Mistral AI embedding models.
Mistral Embedder embeds documents using Mistral AI's embedding models.
Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
id | str | The model ID to use for embeddings | "mistral-embed" |
dimensions | int | Output dimensions of the embedding | 1024 |
request_params | Optional[Dict[str, Any]] | Additional parameters for embedding requests | None |
api_key | Optional[str] | Mistral API key | Environment variable MISTRAL_API_KEY |
endpoint | Optional[str] | Legacy adapter option; leave None with the current Mistral SDK (see below) | None |
max_retries | Optional[int] | Legacy adapter option; leave None with the current Mistral SDK (see below) | None |
timeout | Optional[int] | Request timeout in seconds; converted to the SDK timeout_ms value | None |
client_params | Optional[Dict[str, Any]] | Additional parameters for client initialization | None |
mistral_client | Optional[Mistral] | Pre-configured Mistral client | None |
enable_batch | bool | Embed multiple texts per API call when adding content to vector databases | False |
batch_size | int | Number of texts per batch when enable_batch is True | 100 |
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.