Skip to content

Commit 350bc07

Browse files
authored
Merge pull request #357 from mistralai/doc/v0.1.22
Update docs to v0.1.22
2 parents 6d90fcf + 9af908e commit 350bc07

File tree

73 files changed

+898
-310
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+898
-310
lines changed

public/img/food-receipt.jpg

110 KB
Loading

public/img/old-page.jpg

23.9 KB
Loading

public/img/stadium-paris.jpeg

149 KB
Loading

src/app/(docs)/agents/tools/built-in/document_library/create_tab/_page.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ You specify the libraries that the agent has access to with `library_ids`, you c
66

77
:::tip
88
It is also possible to specify libraries created via Le Chat; these IDs are visible in the URL of the corresponding library created on Le Chat, for example: `https://chat.mistral.ai/libraries/<library_id>`; To enable the Agent to access Le Chat library, you have to be an Org admin and share it with the Organization.
9+
10+
The opposite is also possible, you can create a library via API and share it with your team on Le Chat.
11+
Find more on how to share and manage libraries [here](?tab=manage-libraries#explorer-tabs-agent_creation_and_library_management).
912
:::
1013

1114
<Tabs groupId="code">
@@ -114,3 +117,5 @@ curl --location "https://api.mistral.ai/v1/agents" \
114117
</Tabs>
115118

116119
As with other agents, when creating one, you will receive an agent ID corresponding to the created agent. You can use this ID to start a conversation.
120+
121+
Next, learn how you can manage your libraries and agents in the **[Manage Libraries](?tab=manage-libraries#explorer-tabs-agent_creation_and_library_management)** tab.

src/app/(docs)/capabilities/completion/usage/non_streaming_tab/_page.mdx

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ The content can be either a string, the most standard usage of llms:
1212

1313
<Tabs groupId="code">
1414
<TabItem value="python" label="python" default>
15-
<Tabs groupId="syn">
15+
<Tabs groupId="sync">
1616
<TabItem value="sync" label="Synchronous" default>
1717

1818
```python
1919
import os
2020
from mistralai import Mistral
2121

2222
api_key = os.environ["MISTRAL_API_KEY"]
23-
model = "mistral-medium-latest"
23+
model = "mistral-large-latest"
2424

2525
client = Mistral(api_key=api_key)
2626

@@ -29,7 +29,7 @@ chat_response = client.chat.complete(
2929
messages = [
3030
{
3131
"role": "user",
32-
"content": "What is the best French cheese?",
32+
"content": "How far is the moon from earth?",
3333
},
3434
]
3535
)
@@ -47,13 +47,13 @@ from mistralai.models import UserMessage
4747

4848
async def main():
4949
api_key = os.environ["MISTRAL_API_KEY"]
50-
model = "mistral-medium-latest"
50+
model = "mistral-large-latest"
5151

5252
client = Mistral(api_key=api_key)
5353

5454
chat_response = await client.chat.complete_async(
5555
model=model,
56-
messages=[UserMessage(content="What is the best French cheese?")],
56+
messages=[UserMessage(content="How far is the moon from earth?")],
5757
)
5858

5959
if __name__ == "__main__":
@@ -77,8 +77,8 @@ const client = new Mistral({apiKey: apiKey});
7777

7878
async function main() {
7979
const chatResponse = await client.chat.complete({
80-
model: "mistral-medium-latest",
81-
messages: [{role: 'user', content: 'What is the best French cheese?'}]
80+
model: "mistral-large-latest",
81+
messages: [{role: 'user', content: 'How far is the moon from earth?'}]
8282
});
8383
}
8484

@@ -94,11 +94,11 @@ curl --location "https://api.mistral.ai/v1/chat/completions" \
9494
--header 'Accept: application/json' \
9595
--header "Authorization: Bearer $MISTRAL_API_KEY" \
9696
--data '{
97-
"model": "mistral-medium-latest",
97+
"model": "mistral-large-latest",
9898
"messages": [
9999
{
100100
"role": "user",
101-
"content": "What is the best French cheese?"
101+
"content": "How far is the moon from earth?"
102102
}
103103
]
104104
}'
@@ -109,24 +109,25 @@ curl --location "https://api.mistral.ai/v1/chat/completions" \
109109

110110
```json
111111
{
112-
"id": "7c163b08d98e4eebb35564ae14ffe6e4",
113-
"created": 1756130273,
114-
"model": "mistral-medium-latest",
112+
"id": "bed9481e857e40fab7c7eea4232f294a",
113+
"object": "chat.completion",
114+
"model": "mistral-large-latest",
115115
"usage": {
116-
"prompt_tokens": 10,
117-
"total_tokens": 1160,
118-
"completion_tokens": 1150
116+
"prompt_tokens": 11,
117+
"completion_tokens": 268,
118+
"total_tokens": 279
119119
},
120-
"object": "chat.completion",
120+
"created": 1764257531,
121121
"choices": [
122122
{
123123
"index": 0,
124-
"finish_reason": "stop",
125124
"message": {
126-
"role": "assistant",
125+
"content": "The distance between the **Earth and the Moon** varies because the Moon follows an **elliptical (oval-shaped) orbit** around Earth. Here are the key distances:\n\n1. **Average Distance (Semi-Major Axis):**\n - **384,400 km (238,855 miles)**\n - This is the most commonly cited distance.\n\n2. **Closest Approach (Perigee):**\n - **~363,300 km (225,700 miles)**\n - When the Moon is at its closest point to Earth.\n\n3. **Farthest Distance (Apogee):**\n - **~405,500 km (252,000 miles)**\n - When the Moon is at its farthest point from Earth.\n\n### Additional Fun Facts:\n- The Moon is **slowly moving away** from Earth at a rate of **~3.8 cm (1.5 inches) per year** due to tidal forces.\n- Light takes **~1.28 seconds** to travel from the Moon to Earth at the average distance.\n- The Apollo missions took **~3 days** to reach the Moon.\n\nWould you like details on how this distance is measured?",
127126
"tool_calls": null,
128-
"content": "The \"best\" French cheese is highly subjective—it depends on personal taste, texture preferences, and how you plan to enjoy it (on a cheese board, melted, in cooking, etc.). However, here are some of the most **iconic, beloved, and award-winning French cheeses**, each celebrated for its unique qualities:\n\n### **Top Contenders for \"Best\" French Cheese**\n1. **Comté** (AOP)\n - **Why?** A versatile, nutty, and complex **alpine cheese** aged 4 months to 3+ years. Younger Comté is mild and buttery; aged versions develop crystalline crunch and deep caramelized flavors.\n - **Best for:** Cheese boards, fondue, grilled cheese, or eating plain.\n - **Fun fact:** Made in the Jura Mountains, each wheel is unique based on the terroir and aging.\n\n2. **Roquefort** (AOP)\n - **Why?** The **king of blue cheeses**, made from sheep’s milk and aged in natural caves. Creamy, tangy, and intensely flavorful with a sharp, salty bite.\n - **Best for:** Spread on bread with honey or pears, in salads, or sauces.\n - **Fun fact:** One of the oldest cheeses in France (mentioned by Pliny the Elder in 79 AD).\n\n3. **Camembert de Normandie** (AOP)\n - **Why?** The **quintessential French cheese**—creamy, earthy, and slightly mushroomy when ripe. Invented in 1791 by Marie Harel.\n - **Best for:** Baked (Camembert en croûte), with crusty bread, or apples.\n - **Pro tip:** Eat it at room temperature when the center is soft but not runny.\n\n4. **Époisses de Bourgogne** (AOP)\n - **Why?** A **pungent, washed-rind cheese** with a velvety texture and bold, barnyardy flavor. Napoleon reportedly loved it.\n - **Best for:** Spreading on bread or pairing with Burgundy wine.\n - **Warning:** So strong it’s banned on French public transport!\n\n5. **Reblochon** (AOP)\n - **Why?** The **star of tartiflette**—creamy, nutty, and slightly smoky. Made in the Alps with raw cow’s milk.\n - **Best for:** Melting in tartiflette, raclette, or on potatoes.\n\n6. **Brie de Meaux** (AOP)\n - **Why?** The **\"King of Cheeses\"** (as declared at the 1815 Congress of Vienna). Rich, buttery, and mushroomy with a soft rind.\n - **Best for:** Pairing with Champagne or fruit (grapes, figs).\n\n7. **Munster (Munster-Géromé)** (AOP)\n - **Why?** A **stinky, washed-rind cheese** from Alsace with a creamy, tangy interior. Often served with cumin.\n - **Best for:** Melting in tarts or eating with beer.\n\n8. **Beaufort** (AOP)\n - **Why?** A **firm, nutty alpine cheese** similar to Gruyère but richer. Aged versions are caramelized and complex.\n - **Best for:** Fondue, gratins, or shaving over salads.\n\n9. **Pélardon** (AOP)\n - **Why?** A **small, tangy goat cheese** from the Cévennes or Provence. Comes in fresh (soft) or aged (firm, peppery) varieties.\n - **Best for:** Salads, tartines, or grilled with herbs.\n\n10. **Bleu d’Auvergne** (AOP)\n - **Why?** A **creamy, spicy blue cheese** with a sharper taste than Roquefort but less crumbly.\n - **Best for:** Dressings, burgers, or cheese plates with walnuts.\n\n### **How to Choose?**\n- **Mild & creamy?** → Brie de Meaux, Camembert, Saint-André.\n- **Bold & stinky?** → Époisses, Munster, Pont-l’Évêque.\n- **Nutty & firm?** → Comté, Beaufort, Cantal.\n- **Blue cheese lover?** → Roquefort, Bleu d’Auvergne.\n- **Goat cheese fan?** → Crottin de Chavignol, Pélardon, Valençay.\n\n### **Pro Tips for Enjoying French Cheese**\n- **Serve at room temperature** (take it out of the fridge 1–2 hours before eating).\n- **Pair with wine**: Brie + Champagne, Roquefort + Sauternes, Comté + Jura wine.\n- **Avoid plastic wrap**—store in cheese paper or a breathable container.\n- **Visit a *fromagerie*** in France for expert recommendations!\n\n### **Final Verdict**\nIf forced to pick **one \"best\"**, **Comté** (aged 24+ months) and **Roquefort** are often crowned for their depth and versatility. But the true joy of French cheese is in the **diversity**—so try them all!\n\n**What’s your favorite?** 😊🧀"
129-
}
127+
"prefix": false,
128+
"role": "assistant"
129+
},
130+
"finish_reason": "stop"
130131
}
131132
]
132133
}

src/app/(docs)/capabilities/completion/usage/streaming_tab/_page.mdx

Lines changed: 50 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import os
2020
from mistralai import Mistral
2121

2222
api_key = os.environ["MISTRAL_API_KEY"]
23-
model = "mistral-medium-latest"
23+
model = "mistral-large-latest"
2424

2525
client = Mistral(api_key=api_key)
2626

@@ -29,7 +29,7 @@ stream_response = client.chat.stream(
2929
messages = [
3030
{
3131
"role": "user",
32-
"content": "What is the best French cheese?",
32+
"content": "How far is the moon from earth? Answer with the distance in km only.",
3333
},
3434
]
3535
)
@@ -50,7 +50,7 @@ from mistralai import Mistral
5050

5151
async def main():
5252
api_key = os.environ["MISTRAL_API_KEY"]
53-
model = "mistral-medium-latest"
53+
model = "mistral-large-latest"
5454

5555
client = Mistral(api_key=api_key)
5656

@@ -59,7 +59,7 @@ async def main():
5959
messages=[
6060
{
6161
"role": "user",
62-
"content": "Who is the best French painter? Answer in JSON.",
62+
"content": "How far is the moon from earth? Answer with the distance in km only.",
6363
},
6464
],
6565
)
@@ -91,8 +91,8 @@ const client = new Mistral({ apiKey: apiKey });
9191
async function main() {
9292

9393
const result = await client.chat.stream({
94-
model: "mistral-medium-latest",
95-
messages: [{ role: "user", content: "What is the best French cheese?" }],
94+
model: "mistral-large-latest",
95+
messages: [{ role: "user", content: "How far is the moon from earth? Answer with the distance in km only." }],
9696
});
9797

9898
// If you want to print the stream text to the console
@@ -116,11 +116,11 @@ curl --location "https://api.mistral.ai/v1/chat/completions" \
116116
--header 'Accept: application/json' \
117117
--header "Authorization: Bearer $MISTRAL_API_KEY" \
118118
--data '{
119-
"model": "mistral-medium-latest",
119+
"model": "mistral-large-latest",
120120
"messages": [
121121
{
122122
"role": "user",
123-
"content": "What is the best French cheese?"
123+
"content": "How far is the moon from earth? Answer with the distance in km only."
124124
}
125125
],
126126
"stream": true
@@ -131,105 +131,91 @@ curl --location "https://api.mistral.ai/v1/chat/completions" \
131131
<TabItem value="output" label="output">
132132

133133
```json
134-
data: {
135-
"id":"64a7f9da74be4e06bccfcff4a2b3ed03",
136-
"object":"chat.completion.chunk",
137-
"created":1756223818,
138-
"model":"mistral-medium-latest",
139-
"choices":[
140-
{
141-
"index":0,
142-
"delta": {
143-
"role":"assistant",
144-
"content":""
145-
},
146-
"finish_reason":null
147-
}
148-
]
149-
}
150-
data: {
151-
"id": "64a7f9da74be4e06bccfcff4a2b3ed03",
152-
"object": "chat.completion.chunk",
153-
"created": 1756223818,
154-
"model": "mistral-medium-latest",
134+
{
135+
"id": "59060ef9339a4112b2c9e57e3ee6199d",
136+
"model": "mistral-large-latest",
155137
"choices": [
156138
{
157139
"index": 0,
158140
"delta": {
159-
"content": "The \""
141+
"role": "assistant",
142+
"content": ""
160143
},
161144
"finish_reason": null
162145
}
163-
]
164-
}
165-
data: {
166-
"id": "64a7f9da74be4e06bccfcff4a2b3ed03",
146+
],
167147
"object": "chat.completion.chunk",
168-
"created": 1756223818,
169-
"model": "mistral-medium-latest",
148+
"created": 1764258570,
149+
"usage": null
150+
}
151+
{
152+
"id": "59060ef9339a4112b2c9e57e3ee6199d",
153+
"model": "mistral-large-latest",
170154
"choices": [
171155
{
172156
"index": 0,
173157
"delta": {
174-
"content": "best"
158+
"content": "3"
175159
},
176160
"finish_reason": null
177161
}
178-
]
179-
}
180-
...
181-
data: {
182-
"id": "64a7f9da74be4e06bccfcff4a2b3ed03",
162+
],
183163
"object": "chat.completion.chunk",
184-
"created": 1756223818,
185-
"model": "mistral-medium-latest",
164+
"created": 1764258570,
165+
"usage": null
166+
}
167+
{
168+
"id": "59060ef9339a4112b2c9e57e3ee6199d",
169+
"model": "mistral-large-latest",
186170
"choices": [
187171
{
188172
"index": 0,
189173
"delta": {
190-
"content": " dish"
174+
"content": "84"
191175
},
192176
"finish_reason": null
193177
}
194-
]
195-
}
196-
data: {
197-
"id": "64a7f9da74be4e06bccfcff4a2b3ed03",
178+
],
198179
"object": "chat.completion.chunk",
199-
"created": 1756223818,
200-
"model": "mistral-medium-latest",
180+
"created": 1764258570,
181+
"usage": null
182+
}
183+
{
184+
"id": "59060ef9339a4112b2c9e57e3ee6199d",
185+
"model": "mistral-large-latest",
201186
"choices": [
202187
{
203188
"index": 0,
204189
"delta": {
205-
"content": "?"
190+
"content": "4"
206191
},
207192
"finish_reason": null
208193
}
209-
]
210-
}
211-
data: {
212-
"id": "64a7f9da74be4e06bccfcff4a2b3ed03",
194+
],
213195
"object": "chat.completion.chunk",
214-
"created": 1756223818,
215-
"model": "mistral-medium-latest",
196+
"created": 1764258570,
197+
"usage": null
198+
}
199+
{
200+
"id": "59060ef9339a4112b2c9e57e3ee6199d",
201+
"model": "mistral-large-latest",
216202
"choices": [
217203
{
218204
"index": 0,
219205
"delta": {
220-
"content": ""
206+
"content": "00"
221207
},
222208
"finish_reason": "stop"
223209
}
224210
],
211+
"object": "chat.completion.chunk",
212+
"created": 1764258570,
225213
"usage": {
226-
"prompt_tokens": 10,
227-
"total_tokens": 1254,
228-
"completion_tokens": 1244
214+
"prompt_tokens": 19,
215+
"completion_tokens": 7,
216+
"total_tokens": 26
229217
}
230218
}
231-
data: [DONE]
232219
```
233-
234220
</TabItem>
235221
</Tabs>

0 commit comments

Comments
 (0)