Parameters
Parameter | Type | Default | Description |
---|---|---|---|
api_key | str | None | None | The API key to use for authentication, if not provided, the MISTRAL_API_KEY environment variable will be used if available. |
mistral_client | Mistral | None | None | An existing Mistral client to use, if provided, api_key and http_client must be None . |
base_url | str | None | None | The base url for the Mistral requests. |
http_client | httpx.AsyncClient | None | None | An existing async client to use for making HTTP requests. |
Functions
__init__
Create a new Mistral provider.
Parameters:
api_key
(str | None): The API key to use for authentication, if not provided, theMISTRAL_API_KEY
environment variable will be used if available.mistral_client
(Mistral | None): An existingMistral
client to use, if provided,api_key
andhttp_client
must beNone
.base_url
(str | None): The base url for the Mistral requests.http_client
(httpx.AsyncClient | None): An existing async client to use for making HTTP requests.
name
Get the provider name.
Returns:
str
: The provider name (‘mistral’)
base_url
Get the base URL for the provider API.
Returns:
str
: The base URL for the provider API
client
Get the client for the provider.
Returns:
Mistral
: The Mistral client
model_profile
Get the model profile for the named model, if available.
Parameters:
model_name
(str): The name of the model
ModelProfile | None
: The model profile for the named model, if available