mistralai 1.10.0__py3-none-any.whl → 1.10.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mistralai/_hooks/tracing.py +28 -3
- mistralai/_version.py +2 -2
- mistralai/classifiers.py +13 -1
- mistralai/embeddings.py +7 -1
- mistralai/extra/README.md +1 -1
- mistralai/extra/mcp/auth.py +10 -11
- mistralai/extra/mcp/base.py +17 -16
- mistralai/extra/mcp/sse.py +13 -15
- mistralai/extra/mcp/stdio.py +5 -6
- mistralai/extra/observability/otel.py +47 -68
- mistralai/extra/run/context.py +33 -43
- mistralai/extra/run/result.py +29 -30
- mistralai/extra/run/tools.py +8 -9
- mistralai/extra/struct_chat.py +15 -8
- mistralai/extra/utils/response_format.py +5 -3
- mistralai/mistral_jobs.py +31 -5
- mistralai/models/__init__.py +30 -1
- mistralai/models/agents_api_v1_agents_listop.py +1 -1
- mistralai/models/agents_api_v1_conversations_listop.py +1 -1
- mistralai/models/audioencoding.py +13 -0
- mistralai/models/audioformat.py +19 -0
- mistralai/models/batchjobin.py +17 -6
- mistralai/models/batchjobout.py +5 -0
- mistralai/models/batchrequest.py +48 -0
- mistralai/models/classificationrequest.py +37 -3
- mistralai/models/embeddingrequest.py +11 -3
- mistralai/models/jobs_api_routes_batch_get_batch_jobop.py +40 -3
- mistralai/models/toolfilechunk.py +11 -4
- mistralai/models/toolreferencechunk.py +13 -4
- {mistralai-1.10.0.dist-info → mistralai-1.10.1.dist-info}/METADATA +142 -150
- {mistralai-1.10.0.dist-info → mistralai-1.10.1.dist-info}/RECORD +122 -105
- {mistralai-1.10.0.dist-info → mistralai-1.10.1.dist-info}/WHEEL +1 -1
- mistralai_azure/_version.py +3 -3
- mistralai_azure/basesdk.py +15 -5
- mistralai_azure/chat.py +59 -98
- mistralai_azure/models/__init__.py +50 -3
- mistralai_azure/models/chatcompletionrequest.py +16 -4
- mistralai_azure/models/chatcompletionstreamrequest.py +16 -4
- mistralai_azure/models/httpvalidationerror.py +11 -6
- mistralai_azure/models/mistralazureerror.py +26 -0
- mistralai_azure/models/no_response_error.py +13 -0
- mistralai_azure/models/prediction.py +4 -0
- mistralai_azure/models/responseformat.py +4 -2
- mistralai_azure/models/responseformats.py +0 -1
- mistralai_azure/models/responsevalidationerror.py +25 -0
- mistralai_azure/models/sdkerror.py +30 -14
- mistralai_azure/models/systemmessage.py +7 -3
- mistralai_azure/models/systemmessagecontentchunks.py +21 -0
- mistralai_azure/models/thinkchunk.py +35 -0
- mistralai_azure/ocr.py +15 -36
- mistralai_azure/utils/__init__.py +18 -5
- mistralai_azure/utils/eventstreaming.py +10 -0
- mistralai_azure/utils/serializers.py +3 -2
- mistralai_azure/utils/unmarshal_json_response.py +24 -0
- mistralai_gcp/_hooks/types.py +7 -0
- mistralai_gcp/_version.py +4 -4
- mistralai_gcp/basesdk.py +27 -25
- mistralai_gcp/chat.py +75 -98
- mistralai_gcp/fim.py +39 -74
- mistralai_gcp/httpclient.py +6 -16
- mistralai_gcp/models/__init__.py +321 -116
- mistralai_gcp/models/assistantmessage.py +1 -1
- mistralai_gcp/models/chatcompletionrequest.py +36 -7
- mistralai_gcp/models/chatcompletionresponse.py +6 -6
- mistralai_gcp/models/chatcompletionstreamrequest.py +36 -7
- mistralai_gcp/models/completionresponsestreamchoice.py +1 -1
- mistralai_gcp/models/deltamessage.py +1 -1
- mistralai_gcp/models/fimcompletionrequest.py +3 -9
- mistralai_gcp/models/fimcompletionresponse.py +6 -6
- mistralai_gcp/models/fimcompletionstreamrequest.py +3 -9
- mistralai_gcp/models/httpvalidationerror.py +11 -6
- mistralai_gcp/models/imageurl.py +1 -1
- mistralai_gcp/models/jsonschema.py +1 -1
- mistralai_gcp/models/mistralgcperror.py +26 -0
- mistralai_gcp/models/mistralpromptmode.py +8 -0
- mistralai_gcp/models/no_response_error.py +13 -0
- mistralai_gcp/models/prediction.py +4 -0
- mistralai_gcp/models/responseformat.py +5 -3
- mistralai_gcp/models/responseformats.py +0 -1
- mistralai_gcp/models/responsevalidationerror.py +25 -0
- mistralai_gcp/models/sdkerror.py +30 -14
- mistralai_gcp/models/systemmessage.py +7 -3
- mistralai_gcp/models/systemmessagecontentchunks.py +21 -0
- mistralai_gcp/models/thinkchunk.py +35 -0
- mistralai_gcp/models/toolmessage.py +1 -1
- mistralai_gcp/models/usageinfo.py +71 -8
- mistralai_gcp/models/usermessage.py +1 -1
- mistralai_gcp/sdk.py +12 -10
- mistralai_gcp/sdkconfiguration.py +0 -7
- mistralai_gcp/types/basemodel.py +3 -3
- mistralai_gcp/utils/__init__.py +143 -45
- mistralai_gcp/utils/datetimes.py +23 -0
- mistralai_gcp/utils/enums.py +67 -27
- mistralai_gcp/utils/eventstreaming.py +10 -0
- mistralai_gcp/utils/forms.py +49 -28
- mistralai_gcp/utils/serializers.py +33 -3
- mistralai_gcp/utils/unmarshal_json_response.py +24 -0
- {mistralai-1.10.0.dist-info → mistralai-1.10.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,43 +1,36 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mistralai
|
|
3
|
-
Version: 1.10.
|
|
3
|
+
Version: 1.10.1
|
|
4
4
|
Summary: Python Client SDK for the Mistral AI API.
|
|
5
|
-
|
|
5
|
+
Project-URL: Repository, https://github.com/mistralai/client-python.git
|
|
6
6
|
Author: Mistral
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Requires-Dist: eval-type-backport>=0.2.0
|
|
10
|
+
Requires-Dist: httpx>=0.28.1
|
|
11
|
+
Requires-Dist: invoke<3.0.0,>=2.2.0
|
|
12
|
+
Requires-Dist: opentelemetry-api<2.0.0,>=1.33.1
|
|
13
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-http<2.0.0,>=1.37.0
|
|
14
|
+
Requires-Dist: opentelemetry-sdk<2.0.0,>=1.33.1
|
|
15
|
+
Requires-Dist: opentelemetry-semantic-conventions<0.60,>=0.59b0
|
|
16
|
+
Requires-Dist: pydantic>=2.10.3
|
|
17
|
+
Requires-Dist: python-dateutil>=2.8.2
|
|
18
|
+
Requires-Dist: pyyaml<7.0.0,>=6.0.2
|
|
19
|
+
Requires-Dist: typing-inspection>=0.4.0
|
|
15
20
|
Provides-Extra: agents
|
|
21
|
+
Requires-Dist: authlib<2.0,>=1.5.2; extra == 'agents'
|
|
22
|
+
Requires-Dist: griffe<2.0,>=1.7.3; extra == 'agents'
|
|
23
|
+
Requires-Dist: mcp<2.0,>=1.0; extra == 'agents'
|
|
16
24
|
Provides-Extra: gcp
|
|
17
|
-
Requires-Dist:
|
|
18
|
-
Requires-Dist:
|
|
19
|
-
Requires-Dist: google-auth (>=2.27.0) ; extra == "gcp"
|
|
20
|
-
Requires-Dist: griffe (>=1.7.3,<2.0) ; extra == "agents"
|
|
21
|
-
Requires-Dist: httpx (>=0.28.1)
|
|
22
|
-
Requires-Dist: invoke (>=2.2.0,<3.0.0)
|
|
23
|
-
Requires-Dist: mcp (>=1.0,<2.0) ; (python_version >= "3.10") and (extra == "agents")
|
|
24
|
-
Requires-Dist: opentelemetry-api (>=1.33.1,<2.0.0)
|
|
25
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.37.0,<2.0.0)
|
|
26
|
-
Requires-Dist: opentelemetry-sdk (>=1.33.1,<2.0.0)
|
|
27
|
-
Requires-Dist: opentelemetry-semantic-conventions (>=0.59b0,<0.60)
|
|
28
|
-
Requires-Dist: pydantic (>=2.10.3)
|
|
29
|
-
Requires-Dist: python-dateutil (>=2.8.2)
|
|
30
|
-
Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
|
|
31
|
-
Requires-Dist: requests (>=2.32.3) ; extra == "gcp"
|
|
32
|
-
Requires-Dist: typing-inspection (>=0.4.0)
|
|
33
|
-
Project-URL: Repository, https://github.com/mistralai/client-python.git
|
|
25
|
+
Requires-Dist: google-auth>=2.27.0; extra == 'gcp'
|
|
26
|
+
Requires-Dist: requests>=2.32.3; extra == 'gcp'
|
|
34
27
|
Description-Content-Type: text/markdown
|
|
35
28
|
|
|
36
29
|
# Mistral Python Client
|
|
37
30
|
|
|
38
31
|
## Migration warning
|
|
39
32
|
|
|
40
|
-
This documentation is for Mistral AI SDK v1. You can find more details on how to migrate from v0 to v1 [here](
|
|
33
|
+
This documentation is for Mistral AI SDK v1. You can find more details on how to migrate from v0 to v1 [here](MIGRATION.md)
|
|
41
34
|
|
|
42
35
|
## API Key Setup
|
|
43
36
|
|
|
@@ -63,25 +56,25 @@ Mistral AI API: Our Chat Completion and Embeddings APIs specification. Create yo
|
|
|
63
56
|
<!-- Start Table of Contents [toc] -->
|
|
64
57
|
## Table of Contents
|
|
65
58
|
<!-- $toc-max-depth=2 -->
|
|
66
|
-
* [Mistral Python Client](
|
|
67
|
-
* [Migration warning](
|
|
68
|
-
* [API Key Setup](
|
|
69
|
-
* [SDK Installation](
|
|
70
|
-
* [SDK Example Usage](
|
|
71
|
-
* [Providers' SDKs Example Usage](
|
|
72
|
-
* [Available Resources and Operations](
|
|
73
|
-
* [Server-sent event streaming](
|
|
74
|
-
* [File uploads](
|
|
75
|
-
* [Retries](
|
|
76
|
-
* [Error Handling](
|
|
77
|
-
* [Server Selection](
|
|
78
|
-
* [Custom HTTP Client](
|
|
79
|
-
* [Authentication](
|
|
80
|
-
* [Resource Management](
|
|
81
|
-
* [Debugging](
|
|
82
|
-
* [IDE Support](
|
|
83
|
-
* [Development](
|
|
84
|
-
* [Contributions](
|
|
59
|
+
* [Mistral Python Client](#mistral-python-client)
|
|
60
|
+
* [Migration warning](#migration-warning)
|
|
61
|
+
* [API Key Setup](#api-key-setup)
|
|
62
|
+
* [SDK Installation](#sdk-installation)
|
|
63
|
+
* [SDK Example Usage](#sdk-example-usage)
|
|
64
|
+
* [Providers' SDKs Example Usage](#providers-sdks-example-usage)
|
|
65
|
+
* [Available Resources and Operations](#available-resources-and-operations)
|
|
66
|
+
* [Server-sent event streaming](#server-sent-event-streaming)
|
|
67
|
+
* [File uploads](#file-uploads)
|
|
68
|
+
* [Retries](#retries)
|
|
69
|
+
* [Error Handling](#error-handling)
|
|
70
|
+
* [Server Selection](#server-selection)
|
|
71
|
+
* [Custom HTTP Client](#custom-http-client)
|
|
72
|
+
* [Authentication](#authentication)
|
|
73
|
+
* [Resource Management](#resource-management)
|
|
74
|
+
* [Debugging](#debugging)
|
|
75
|
+
* [IDE Support](#ide-support)
|
|
76
|
+
* [Development](#development)
|
|
77
|
+
* [Contributions](#contributions)
|
|
85
78
|
|
|
86
79
|
<!-- End Table of Contents [toc] -->
|
|
87
80
|
|
|
@@ -160,8 +153,7 @@ installing the package:
|
|
|
160
153
|
pip install "mistralai[agents]"
|
|
161
154
|
```
|
|
162
155
|
|
|
163
|
-
> Note:
|
|
164
|
-
> 3.10.
|
|
156
|
+
> Note: These features require Python 3.10+ (the SDK minimum).
|
|
165
157
|
|
|
166
158
|
<!-- Start SDK Example Usage [usage] -->
|
|
167
159
|
## SDK Example Usage
|
|
@@ -382,7 +374,7 @@ asyncio.run(main())
|
|
|
382
374
|
|
|
383
375
|
### More examples
|
|
384
376
|
|
|
385
|
-
You can run the examples in the `examples/` directory using `
|
|
377
|
+
You can run the examples in the `examples/` directory using `uv run`.
|
|
386
378
|
|
|
387
379
|
|
|
388
380
|
## Providers' SDKs Example Usage
|
|
@@ -394,7 +386,7 @@ You can run the examples in the `examples/` directory using `poetry run` or by e
|
|
|
394
386
|
Before you begin, ensure you have `AZUREAI_ENDPOINT` and an `AZURE_API_KEY`. To obtain these, you will need to deploy Mistral on Azure AI.
|
|
395
387
|
See [instructions for deploying Mistral on Azure AI here](https://docs.mistral.ai/deployment/cloud/azure/).
|
|
396
388
|
|
|
397
|
-
Here's a basic example to get you started. You can also run [the example in the `examples` directory](
|
|
389
|
+
Here's a basic example to get you started. You can also run [the example in the `examples` directory](/examples/azure).
|
|
398
390
|
|
|
399
391
|
```python
|
|
400
392
|
import asyncio
|
|
@@ -422,7 +414,7 @@ async def main() -> None:
|
|
|
422
414
|
|
|
423
415
|
asyncio.run(main())
|
|
424
416
|
```
|
|
425
|
-
The documentation for the Azure SDK is available [here](
|
|
417
|
+
The documentation for the Azure SDK is available [here](packages/mistralai_azure/README.md).
|
|
426
418
|
|
|
427
419
|
### Google Cloud
|
|
428
420
|
|
|
@@ -471,7 +463,7 @@ async def main() -> None:
|
|
|
471
463
|
asyncio.run(main())
|
|
472
464
|
```
|
|
473
465
|
|
|
474
|
-
The documentation for the GCP SDK is available [here](
|
|
466
|
+
The documentation for the GCP SDK is available [here](packages/mistralai_gcp/README.md).
|
|
475
467
|
|
|
476
468
|
|
|
477
469
|
<!-- Start Available Resources and Operations [operations] -->
|
|
@@ -480,136 +472,136 @@ The documentation for the GCP SDK is available [here](https://github.com/mistral
|
|
|
480
472
|
<details open>
|
|
481
473
|
<summary>Available methods</summary>
|
|
482
474
|
|
|
483
|
-
### [agents](
|
|
475
|
+
### [agents](docs/sdks/agents/README.md)
|
|
484
476
|
|
|
485
|
-
* [complete](
|
|
486
|
-
* [stream](
|
|
477
|
+
* [complete](docs/sdks/agents/README.md#complete) - Agents Completion
|
|
478
|
+
* [stream](docs/sdks/agents/README.md#stream) - Stream Agents completion
|
|
487
479
|
|
|
488
|
-
### [audio](
|
|
480
|
+
### [audio](docs/sdks/audio/README.md)
|
|
489
481
|
|
|
490
482
|
|
|
491
|
-
#### [audio.transcriptions](
|
|
483
|
+
#### [audio.transcriptions](docs/sdks/transcriptions/README.md)
|
|
492
484
|
|
|
493
|
-
* [complete](
|
|
494
|
-
* [stream](
|
|
485
|
+
* [complete](docs/sdks/transcriptions/README.md#complete) - Create Transcription
|
|
486
|
+
* [stream](docs/sdks/transcriptions/README.md#stream) - Create Streaming Transcription (SSE)
|
|
495
487
|
|
|
496
|
-
### [batch](
|
|
488
|
+
### [batch](docs/sdks/batch/README.md)
|
|
497
489
|
|
|
498
490
|
|
|
499
|
-
#### [batch.jobs](
|
|
491
|
+
#### [batch.jobs](docs/sdks/mistraljobs/README.md)
|
|
500
492
|
|
|
501
|
-
* [list](
|
|
502
|
-
* [create](
|
|
503
|
-
* [get](
|
|
504
|
-
* [cancel](
|
|
493
|
+
* [list](docs/sdks/mistraljobs/README.md#list) - Get Batch Jobs
|
|
494
|
+
* [create](docs/sdks/mistraljobs/README.md#create) - Create Batch Job
|
|
495
|
+
* [get](docs/sdks/mistraljobs/README.md#get) - Get Batch Job
|
|
496
|
+
* [cancel](docs/sdks/mistraljobs/README.md#cancel) - Cancel Batch Job
|
|
505
497
|
|
|
506
|
-
### [beta](
|
|
498
|
+
### [beta](docs/sdks/beta/README.md)
|
|
507
499
|
|
|
508
500
|
|
|
509
|
-
#### [beta.agents](
|
|
501
|
+
#### [beta.agents](docs/sdks/mistralagents/README.md)
|
|
510
502
|
|
|
511
|
-
* [create](
|
|
512
|
-
* [list](
|
|
513
|
-
* [get](
|
|
514
|
-
* [update](
|
|
515
|
-
* [delete](
|
|
516
|
-
* [update_version](
|
|
503
|
+
* [create](docs/sdks/mistralagents/README.md#create) - Create a agent that can be used within a conversation.
|
|
504
|
+
* [list](docs/sdks/mistralagents/README.md#list) - List agent entities.
|
|
505
|
+
* [get](docs/sdks/mistralagents/README.md#get) - Retrieve an agent entity.
|
|
506
|
+
* [update](docs/sdks/mistralagents/README.md#update) - Update an agent entity.
|
|
507
|
+
* [delete](docs/sdks/mistralagents/README.md#delete) - Delete an agent entity.
|
|
508
|
+
* [update_version](docs/sdks/mistralagents/README.md#update_version) - Update an agent version.
|
|
517
509
|
|
|
518
|
-
#### [beta.conversations](
|
|
510
|
+
#### [beta.conversations](docs/sdks/conversations/README.md)
|
|
519
511
|
|
|
520
|
-
* [start](
|
|
521
|
-
* [list](
|
|
522
|
-
* [get](
|
|
523
|
-
* [delete](
|
|
524
|
-
* [append](
|
|
525
|
-
* [get_history](
|
|
526
|
-
* [get_messages](
|
|
527
|
-
* [restart](
|
|
528
|
-
* [start_stream](
|
|
529
|
-
* [append_stream](
|
|
530
|
-
* [restart_stream](
|
|
512
|
+
* [start](docs/sdks/conversations/README.md#start) - Create a conversation and append entries to it.
|
|
513
|
+
* [list](docs/sdks/conversations/README.md#list) - List all created conversations.
|
|
514
|
+
* [get](docs/sdks/conversations/README.md#get) - Retrieve a conversation information.
|
|
515
|
+
* [delete](docs/sdks/conversations/README.md#delete) - Delete a conversation.
|
|
516
|
+
* [append](docs/sdks/conversations/README.md#append) - Append new entries to an existing conversation.
|
|
517
|
+
* [get_history](docs/sdks/conversations/README.md#get_history) - Retrieve all entries in a conversation.
|
|
518
|
+
* [get_messages](docs/sdks/conversations/README.md#get_messages) - Retrieve all messages in a conversation.
|
|
519
|
+
* [restart](docs/sdks/conversations/README.md#restart) - Restart a conversation starting from a given entry.
|
|
520
|
+
* [start_stream](docs/sdks/conversations/README.md#start_stream) - Create a conversation and append entries to it.
|
|
521
|
+
* [append_stream](docs/sdks/conversations/README.md#append_stream) - Append new entries to an existing conversation.
|
|
522
|
+
* [restart_stream](docs/sdks/conversations/README.md#restart_stream) - Restart a conversation starting from a given entry.
|
|
531
523
|
|
|
532
|
-
#### [beta.libraries](
|
|
524
|
+
#### [beta.libraries](docs/sdks/libraries/README.md)
|
|
533
525
|
|
|
534
|
-
* [list](
|
|
535
|
-
* [create](
|
|
536
|
-
* [get](
|
|
537
|
-
* [delete](
|
|
538
|
-
* [update](
|
|
526
|
+
* [list](docs/sdks/libraries/README.md#list) - List all libraries you have access to.
|
|
527
|
+
* [create](docs/sdks/libraries/README.md#create) - Create a new Library.
|
|
528
|
+
* [get](docs/sdks/libraries/README.md#get) - Detailed information about a specific Library.
|
|
529
|
+
* [delete](docs/sdks/libraries/README.md#delete) - Delete a library and all of it's document.
|
|
530
|
+
* [update](docs/sdks/libraries/README.md#update) - Update a library.
|
|
539
531
|
|
|
540
|
-
#### [beta.libraries.accesses](
|
|
532
|
+
#### [beta.libraries.accesses](docs/sdks/accesses/README.md)
|
|
541
533
|
|
|
542
|
-
* [list](
|
|
543
|
-
* [update_or_create](
|
|
544
|
-
* [delete](
|
|
534
|
+
* [list](docs/sdks/accesses/README.md#list) - List all of the access to this library.
|
|
535
|
+
* [update_or_create](docs/sdks/accesses/README.md#update_or_create) - Create or update an access level.
|
|
536
|
+
* [delete](docs/sdks/accesses/README.md#delete) - Delete an access level.
|
|
545
537
|
|
|
546
|
-
#### [beta.libraries.documents](
|
|
538
|
+
#### [beta.libraries.documents](docs/sdks/documents/README.md)
|
|
547
539
|
|
|
548
|
-
* [list](
|
|
549
|
-
* [upload](
|
|
550
|
-
* [get](
|
|
551
|
-
* [update](
|
|
552
|
-
* [delete](
|
|
553
|
-
* [text_content](
|
|
554
|
-
* [status](
|
|
555
|
-
* [get_signed_url](
|
|
556
|
-
* [extracted_text_signed_url](
|
|
557
|
-
* [reprocess](
|
|
540
|
+
* [list](docs/sdks/documents/README.md#list) - List documents in a given library.
|
|
541
|
+
* [upload](docs/sdks/documents/README.md#upload) - Upload a new document.
|
|
542
|
+
* [get](docs/sdks/documents/README.md#get) - Retrieve the metadata of a specific document.
|
|
543
|
+
* [update](docs/sdks/documents/README.md#update) - Update the metadata of a specific document.
|
|
544
|
+
* [delete](docs/sdks/documents/README.md#delete) - Delete a document.
|
|
545
|
+
* [text_content](docs/sdks/documents/README.md#text_content) - Retrieve the text content of a specific document.
|
|
546
|
+
* [status](docs/sdks/documents/README.md#status) - Retrieve the processing status of a specific document.
|
|
547
|
+
* [get_signed_url](docs/sdks/documents/README.md#get_signed_url) - Retrieve the signed URL of a specific document.
|
|
548
|
+
* [extracted_text_signed_url](docs/sdks/documents/README.md#extracted_text_signed_url) - Retrieve the signed URL of text extracted from a given document.
|
|
549
|
+
* [reprocess](docs/sdks/documents/README.md#reprocess) - Reprocess a document.
|
|
558
550
|
|
|
559
|
-
### [chat](
|
|
551
|
+
### [chat](docs/sdks/chat/README.md)
|
|
560
552
|
|
|
561
|
-
* [complete](
|
|
562
|
-
* [stream](
|
|
553
|
+
* [complete](docs/sdks/chat/README.md#complete) - Chat Completion
|
|
554
|
+
* [stream](docs/sdks/chat/README.md#stream) - Stream chat completion
|
|
563
555
|
|
|
564
|
-
### [classifiers](
|
|
556
|
+
### [classifiers](docs/sdks/classifiers/README.md)
|
|
565
557
|
|
|
566
|
-
* [moderate](
|
|
567
|
-
* [moderate_chat](
|
|
568
|
-
* [classify](
|
|
569
|
-
* [classify_chat](
|
|
558
|
+
* [moderate](docs/sdks/classifiers/README.md#moderate) - Moderations
|
|
559
|
+
* [moderate_chat](docs/sdks/classifiers/README.md#moderate_chat) - Chat Moderations
|
|
560
|
+
* [classify](docs/sdks/classifiers/README.md#classify) - Classifications
|
|
561
|
+
* [classify_chat](docs/sdks/classifiers/README.md#classify_chat) - Chat Classifications
|
|
570
562
|
|
|
571
|
-
### [embeddings](
|
|
563
|
+
### [embeddings](docs/sdks/embeddings/README.md)
|
|
572
564
|
|
|
573
|
-
* [create](
|
|
565
|
+
* [create](docs/sdks/embeddings/README.md#create) - Embeddings
|
|
574
566
|
|
|
575
|
-
### [files](
|
|
567
|
+
### [files](docs/sdks/files/README.md)
|
|
576
568
|
|
|
577
|
-
* [upload](
|
|
578
|
-
* [list](
|
|
579
|
-
* [retrieve](
|
|
580
|
-
* [delete](
|
|
581
|
-
* [download](
|
|
582
|
-
* [get_signed_url](
|
|
569
|
+
* [upload](docs/sdks/files/README.md#upload) - Upload File
|
|
570
|
+
* [list](docs/sdks/files/README.md#list) - List Files
|
|
571
|
+
* [retrieve](docs/sdks/files/README.md#retrieve) - Retrieve File
|
|
572
|
+
* [delete](docs/sdks/files/README.md#delete) - Delete File
|
|
573
|
+
* [download](docs/sdks/files/README.md#download) - Download File
|
|
574
|
+
* [get_signed_url](docs/sdks/files/README.md#get_signed_url) - Get Signed Url
|
|
583
575
|
|
|
584
|
-
### [fim](
|
|
576
|
+
### [fim](docs/sdks/fim/README.md)
|
|
585
577
|
|
|
586
|
-
* [complete](
|
|
587
|
-
* [stream](
|
|
578
|
+
* [complete](docs/sdks/fim/README.md#complete) - Fim Completion
|
|
579
|
+
* [stream](docs/sdks/fim/README.md#stream) - Stream fim completion
|
|
588
580
|
|
|
589
|
-
### [fine_tuning](
|
|
581
|
+
### [fine_tuning](docs/sdks/finetuning/README.md)
|
|
590
582
|
|
|
591
583
|
|
|
592
|
-
#### [fine_tuning.jobs](
|
|
584
|
+
#### [fine_tuning.jobs](docs/sdks/jobs/README.md)
|
|
593
585
|
|
|
594
|
-
* [list](
|
|
595
|
-
* [create](
|
|
596
|
-
* [get](
|
|
597
|
-
* [cancel](
|
|
598
|
-
* [start](
|
|
586
|
+
* [list](docs/sdks/jobs/README.md#list) - Get Fine Tuning Jobs
|
|
587
|
+
* [create](docs/sdks/jobs/README.md#create) - Create Fine Tuning Job
|
|
588
|
+
* [get](docs/sdks/jobs/README.md#get) - Get Fine Tuning Job
|
|
589
|
+
* [cancel](docs/sdks/jobs/README.md#cancel) - Cancel Fine Tuning Job
|
|
590
|
+
* [start](docs/sdks/jobs/README.md#start) - Start Fine Tuning Job
|
|
599
591
|
|
|
600
592
|
|
|
601
|
-
### [models](
|
|
593
|
+
### [models](docs/sdks/models/README.md)
|
|
602
594
|
|
|
603
|
-
* [list](
|
|
604
|
-
* [retrieve](
|
|
605
|
-
* [delete](
|
|
606
|
-
* [update](
|
|
607
|
-
* [archive](
|
|
608
|
-
* [unarchive](
|
|
595
|
+
* [list](docs/sdks/models/README.md#list) - List Models
|
|
596
|
+
* [retrieve](docs/sdks/models/README.md#retrieve) - Retrieve Model
|
|
597
|
+
* [delete](docs/sdks/models/README.md#delete) - Delete Model
|
|
598
|
+
* [update](docs/sdks/models/README.md#update) - Update Fine Tuned Model
|
|
599
|
+
* [archive](docs/sdks/models/README.md#archive) - Archive Fine Tuned Model
|
|
600
|
+
* [unarchive](docs/sdks/models/README.md#unarchive) - Unarchive Fine Tuned Model
|
|
609
601
|
|
|
610
|
-
### [ocr](
|
|
602
|
+
### [ocr](docs/sdks/ocr/README.md)
|
|
611
603
|
|
|
612
|
-
* [process](
|
|
604
|
+
* [process](docs/sdks/ocr/README.md#process) - OCR
|
|
613
605
|
|
|
614
606
|
</details>
|
|
615
607
|
<!-- End Available Resources and Operations [operations] -->
|
|
@@ -737,7 +729,7 @@ with Mistral(
|
|
|
737
729
|
<!-- Start Error Handling [errors] -->
|
|
738
730
|
## Error Handling
|
|
739
731
|
|
|
740
|
-
[`MistralError`](
|
|
732
|
+
[`MistralError`](./src/mistralai/models/mistralerror.py) is the base class for all HTTP error responses. It has the following properties:
|
|
741
733
|
|
|
742
734
|
| Property | Type | Description |
|
|
743
735
|
| ------------------ | ---------------- | --------------------------------------------------------------------------------------- |
|
|
@@ -746,7 +738,7 @@ with Mistral(
|
|
|
746
738
|
| `err.headers` | `httpx.Headers` | HTTP response headers |
|
|
747
739
|
| `err.body` | `str` | HTTP body. Can be empty string if no body is returned. |
|
|
748
740
|
| `err.raw_response` | `httpx.Response` | Raw HTTP response |
|
|
749
|
-
| `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](
|
|
741
|
+
| `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |
|
|
750
742
|
|
|
751
743
|
### Example
|
|
752
744
|
```python
|
|
@@ -782,7 +774,7 @@ with Mistral(
|
|
|
782
774
|
|
|
783
775
|
### Error Classes
|
|
784
776
|
**Primary error:**
|
|
785
|
-
* [`MistralError`](
|
|
777
|
+
* [`MistralError`](./src/mistralai/models/mistralerror.py): The base class for HTTP error responses.
|
|
786
778
|
|
|
787
779
|
<details><summary>Less common errors (6)</summary>
|
|
788
780
|
|
|
@@ -794,13 +786,13 @@ with Mistral(
|
|
|
794
786
|
* [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out.
|
|
795
787
|
|
|
796
788
|
|
|
797
|
-
**Inherit from [`MistralError`](
|
|
798
|
-
* [`HTTPValidationError`](
|
|
799
|
-
* [`ResponseValidationError`](
|
|
789
|
+
**Inherit from [`MistralError`](./src/mistralai/models/mistralerror.py)**:
|
|
790
|
+
* [`HTTPValidationError`](./src/mistralai/models/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 48 of 70 methods.*
|
|
791
|
+
* [`ResponseValidationError`](./src/mistralai/models/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
|
|
800
792
|
|
|
801
793
|
</details>
|
|
802
794
|
|
|
803
|
-
\* Check [the method documentation](
|
|
795
|
+
\* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable.
|
|
804
796
|
<!-- End Error Handling [errors] -->
|
|
805
797
|
|
|
806
798
|
<!-- Start Server Selection [server] -->
|