Creating an external deployment with Mistral
Create an Mistral Deployment using the External Deployment type. In this article, you will find out how to integrate the Mistral Nemo model in Deeploy. In this example we will focus on deploying an Mistral agent, but next to an agent also the le Chat model and embeddings can be integrated in Deeploy.
Prerequisites
Deploy an agent using Mistral
We use the Mistral Nemo
model that is developed by Mistral and available on their platform. In order to create an external Deployment in Deeploy you need the following:
- The model endpoint from a deployed model
- The API key to communicate with the model
The model inference endpoint and API key
To get a Mistral Nemo inference endpoint, follow these steps:
- On Le Plateforme, create a new agent and API key
- select the Mistral Nemo model, configure the temperature, system prompt and few-shot prompts and click deploy
- Navigate to agents and copy/save the API id
- You need the
https://api.mistral.ai/v1/agent/completions
endpoint in combination with the API id and API Key to inference the agent
Connecting Mistral Nemo in Deeploy
Connect the Mistral Nemo to Deeploy via the UI or locally with the Python client
- UI
- Python client
Complete the following steps in the Deeploy UI
- Log in
- Navigate to the Workspace where you want to add gpt-4o as an external deployment
- Click Create and select External
- Follow the steps, in step 3 you are expected to add:
- The retrieved inference endpoint (e.g.,
https://api.mistral.ai/v1/agent/completions
) - Select
Bearer
as authentication method - Paste the API Key in the password field
- The retrieved inference endpoint (e.g.,
- Once the connection check is successful, continue and complete the Deployment creation process
Make sure you have authenticated with Deeploy as described in the [Python Client documentation](/next/python-client/authentication), and add the Mistral Nemo agent as an external Deployment as illustrated in this example:
from deeploy import CreateExternalDeployment
create_options: CreateExternalDeployment = {
"name": "Mistral Nemo",
"description": "Created with Python client",
"url": "https://api.mistral.ai/v1/agent/completions",
"password": "ExampleBearerToken",
"authentication": "bearer"
}
deployment = client.create_external_deployment(create_options)