Skip to content

Commit 40f0d69

Browse files
refactor(mistralai): simplify the workflow integration
1 parent fcec503 commit 40f0d69

164 files changed

Lines changed: 6713 additions & 1484 deletions

File tree

Some content is hidden

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

.genignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ examples/*
44
src/mistral/extra/*
55
pylintrc
66
scripts/prepare_readme.py
7-
./workflows
7+
src/mistralai/workflows/*

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.env.local
12
.idea
23
**/__pycache__/
34
**/.speakeasy/temp/

.speakeasy/gen.lock

Lines changed: 3658 additions & 745 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,17 @@ generation:
1616
auth:
1717
oAuth2ClientCredentialsEnabled: true
1818
oAuth2PasswordEnabled: false
19+
hoistGlobalSecurity: true
20+
schemas:
21+
allOfMergeStrategy: shallowMerge
22+
requestBodyFieldName: ""
23+
persistentEdits: {}
1924
tests:
2025
generateTests: true
2126
generateNewTests: false
2227
skipResponseBodyAssertions: false
2328
python:
24-
version: 1.10.8
29+
version: 1.11.0
2530
additionalDependencies:
2631
dev:
2732
pytest: ^8.2.2
@@ -31,10 +36,12 @@ python:
3136
allowedRedefinedBuiltins:
3237
- id
3338
- object
39+
asyncMode: both
3440
authors:
3541
- Mistral
3642
baseErrorName: MistralError
3743
clientServerStatusCodesAsErrors: true
44+
constFieldCasing: upper
3845
defaultErrorName: SDKError
3946
description: Python Client SDK for the Mistral AI API.
4047
enableCustomCodeRegions: true
@@ -53,14 +60,19 @@ python:
5360
operations: ""
5461
shared: ""
5562
webhooks: ""
63+
inferUnionDiscriminators: true
5664
inputModelSuffix: input
65+
license: ""
5766
maxMethodParams: 15
5867
methodArguments: infer-optional-args
5968
moduleName: ""
69+
multipartArrayFormat: legacy
6070
outputModelSuffix: output
6171
packageManager: uv
6272
packageName: mistralai
73+
preApplyUnionDiscriminators: false
6374
pytestFilterWarnings: []
6475
pytestTimeout: 0
6576
responseFormat: flat
77+
sseFlatResponse: false
6678
templateVersion: v2

.speakeasy/workflow.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
speakeasyVersion: 1.606.10
1+
speakeasyVersion: 1.683.1
22
sources:
33
mistral-azure-source:
44
sourceNamespace: mistral-openapi-azure
@@ -39,7 +39,7 @@ targets:
3939
sourceRevisionDigest: sha256:cb63bd997cefe7b3b36e91a475df57cb779bf79f183340e0713d8ffb16a2dabc
4040
sourceBlobDigest: sha256:f0caa06fb9bcadc35b097aa5ff69bb5020937652df311722b5e44a282bd95d6d
4141
codeSamplesNamespace: mistral-openapi-code-samples
42-
codeSamplesRevisionDigest: sha256:f1f5f6d78a0c0e0bd0ef062537a279938ebd4706be0c3745b8d3460c975f2565
42+
codeSamplesRevisionDigest: sha256:9bb041f76008838d352cc0430f21f652bc595d8ddd28f80f36ab1ac143c194ae
4343
workflow:
4444
workflowVersion: 1.0.0
4545
speakeasyVersion: 1.606.10

README.md

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ with Mistral(
160160
</br>
161161

162162
The same SDK client can also be used to make asynchronous requests by importing asyncio.
163+
163164
```python
164165
# Asynchronous Example
165166
import asyncio
@@ -213,6 +214,7 @@ with Mistral(
213214
</br>
214215

215216
The same SDK client can also be used to make asynchronous requests by importing asyncio.
217+
216218
```python
217219
# Asynchronous Example
218220
import asyncio
@@ -266,6 +268,7 @@ with Mistral(
266268
</br>
267269

268270
The same SDK client can also be used to make asynchronous requests by importing asyncio.
271+
269272
```python
270273
# Asynchronous Example
271274
import asyncio
@@ -319,6 +322,7 @@ with Mistral(
319322
</br>
320323

321324
The same SDK client can also be used to make asynchronous requests by importing asyncio.
325+
322326
```python
323327
# Asynchronous Example
324328
import asyncio
@@ -444,33 +448,24 @@ The documentation for the GCP SDK is available [here](packages/mistralai_gcp/REA
444448
<details open>
445449
<summary>Available methods</summary>
446450

447-
### [agents](docs/sdks/agents/README.md)
451+
### [Agents](docs/sdks/agents/README.md)
448452

449453
* [complete](docs/sdks/agents/README.md#complete) - Agents Completion
450454
* [stream](docs/sdks/agents/README.md#stream) - Stream Agents completion
451455

452-
### [audio](docs/sdks/audio/README.md)
453-
454-
455-
#### [audio.transcriptions](docs/sdks/transcriptions/README.md)
456+
### [Audio.Transcriptions](docs/sdks/transcriptions/README.md)
456457

457458
* [complete](docs/sdks/transcriptions/README.md#complete) - Create Transcription
458459
* [stream](docs/sdks/transcriptions/README.md#stream) - Create Streaming Transcription (SSE)
459460

460-
### [batch](docs/sdks/batch/README.md)
461-
462-
463-
#### [batch.jobs](docs/sdks/mistraljobs/README.md)
461+
### [Batch.Jobs](docs/sdks/mistraljobs/README.md)
464462

465463
* [list](docs/sdks/mistraljobs/README.md#list) - Get Batch Jobs
466464
* [create](docs/sdks/mistraljobs/README.md#create) - Create Batch Job
467465
* [get](docs/sdks/mistraljobs/README.md#get) - Get Batch Job
468466
* [cancel](docs/sdks/mistraljobs/README.md#cancel) - Cancel Batch Job
469467

470-
### [beta](docs/sdks/beta/README.md)
471-
472-
473-
#### [beta.agents](docs/sdks/mistralagents/README.md)
468+
### [Beta.Agents](docs/sdks/mistralagents/README.md)
474469

475470
* [create](docs/sdks/mistralagents/README.md#create) - Create a agent that can be used within a conversation.
476471
* [list](docs/sdks/mistralagents/README.md#list) - List agent entities.
@@ -479,7 +474,7 @@ The documentation for the GCP SDK is available [here](packages/mistralai_gcp/REA
479474
* [delete](docs/sdks/mistralagents/README.md#delete) - Delete an agent entity.
480475
* [update_version](docs/sdks/mistralagents/README.md#update_version) - Update an agent version.
481476

482-
#### [beta.conversations](docs/sdks/conversations/README.md)
477+
### [Beta.Conversations](docs/sdks/conversations/README.md)
483478

484479
* [start](docs/sdks/conversations/README.md#start) - Create a conversation and append entries to it.
485480
* [list](docs/sdks/conversations/README.md#list) - List all created conversations.
@@ -493,21 +488,21 @@ The documentation for the GCP SDK is available [here](packages/mistralai_gcp/REA
493488
* [append_stream](docs/sdks/conversations/README.md#append_stream) - Append new entries to an existing conversation.
494489
* [restart_stream](docs/sdks/conversations/README.md#restart_stream) - Restart a conversation starting from a given entry.
495490

496-
#### [beta.libraries](docs/sdks/libraries/README.md)
491+
### [Beta.Libraries](docs/sdks/libraries/README.md)
497492

498493
* [list](docs/sdks/libraries/README.md#list) - List all libraries you have access to.
499494
* [create](docs/sdks/libraries/README.md#create) - Create a new Library.
500495
* [get](docs/sdks/libraries/README.md#get) - Detailed information about a specific Library.
501496
* [delete](docs/sdks/libraries/README.md#delete) - Delete a library and all of it's document.
502497
* [update](docs/sdks/libraries/README.md#update) - Update a library.
503498

504-
#### [beta.libraries.accesses](docs/sdks/accesses/README.md)
499+
#### [Beta.Libraries.Accesses](docs/sdks/accesses/README.md)
505500

506501
* [list](docs/sdks/accesses/README.md#list) - List all of the access to this library.
507502
* [update_or_create](docs/sdks/accesses/README.md#update_or_create) - Create or update an access level.
508503
* [delete](docs/sdks/accesses/README.md#delete) - Delete an access level.
509504

510-
#### [beta.libraries.documents](docs/sdks/documents/README.md)
505+
#### [Beta.Libraries.Documents](docs/sdks/documents/README.md)
511506

512507
* [list](docs/sdks/documents/README.md#list) - List documents in a given library.
513508
* [upload](docs/sdks/documents/README.md#upload) - Upload a new document.
@@ -520,23 +515,23 @@ The documentation for the GCP SDK is available [here](packages/mistralai_gcp/REA
520515
* [extracted_text_signed_url](docs/sdks/documents/README.md#extracted_text_signed_url) - Retrieve the signed URL of text extracted from a given document.
521516
* [reprocess](docs/sdks/documents/README.md#reprocess) - Reprocess a document.
522517

523-
### [chat](docs/sdks/chat/README.md)
518+
### [Chat](docs/sdks/chat/README.md)
524519

525520
* [complete](docs/sdks/chat/README.md#complete) - Chat Completion
526521
* [stream](docs/sdks/chat/README.md#stream) - Stream chat completion
527522

528-
### [classifiers](docs/sdks/classifiers/README.md)
523+
### [Classifiers](docs/sdks/classifiers/README.md)
529524

530525
* [moderate](docs/sdks/classifiers/README.md#moderate) - Moderations
531526
* [moderate_chat](docs/sdks/classifiers/README.md#moderate_chat) - Chat Moderations
532527
* [classify](docs/sdks/classifiers/README.md#classify) - Classifications
533528
* [classify_chat](docs/sdks/classifiers/README.md#classify_chat) - Chat Classifications
534529

535-
### [embeddings](docs/sdks/embeddings/README.md)
530+
### [Embeddings](docs/sdks/embeddings/README.md)
536531

537532
* [create](docs/sdks/embeddings/README.md#create) - Embeddings
538533

539-
### [files](docs/sdks/files/README.md)
534+
### [Files](docs/sdks/files/README.md)
540535

541536
* [upload](docs/sdks/files/README.md#upload) - Upload File
542537
* [list](docs/sdks/files/README.md#list) - List Files
@@ -545,24 +540,20 @@ The documentation for the GCP SDK is available [here](packages/mistralai_gcp/REA
545540
* [download](docs/sdks/files/README.md#download) - Download File
546541
* [get_signed_url](docs/sdks/files/README.md#get_signed_url) - Get Signed Url
547542

548-
### [fim](docs/sdks/fim/README.md)
543+
### [Fim](docs/sdks/fim/README.md)
549544

550545
* [complete](docs/sdks/fim/README.md#complete) - Fim Completion
551546
* [stream](docs/sdks/fim/README.md#stream) - Stream fim completion
552547

553-
### [fine_tuning](docs/sdks/finetuning/README.md)
554-
555-
556-
#### [fine_tuning.jobs](docs/sdks/jobs/README.md)
548+
### [FineTuning.Jobs](docs/sdks/jobs/README.md)
557549

558550
* [list](docs/sdks/jobs/README.md#list) - Get Fine Tuning Jobs
559551
* [create](docs/sdks/jobs/README.md#create) - Create Fine Tuning Job
560552
* [get](docs/sdks/jobs/README.md#get) - Get Fine Tuning Job
561553
* [cancel](docs/sdks/jobs/README.md#cancel) - Cancel Fine Tuning Job
562554
* [start](docs/sdks/jobs/README.md#start) - Start Fine Tuning Job
563555

564-
565-
### [models](docs/sdks/models/README.md)
556+
### [Models](docs/sdks/models/README.md)
566557

567558
* [list](docs/sdks/models/README.md#list) - List Models
568559
* [retrieve](docs/sdks/models/README.md#retrieve) - Retrieve Model
@@ -571,7 +562,7 @@ The documentation for the GCP SDK is available [here](packages/mistralai_gcp/REA
571562
* [archive](docs/sdks/models/README.md#archive) - Archive Fine Tuned Model
572563
* [unarchive](docs/sdks/models/README.md#unarchive) - Unarchive Fine Tuned Model
573564

574-
### [ocr](docs/sdks/ocr/README.md)
565+
### [Ocr](docs/sdks/ocr/README.md)
575566

576567
* [process](docs/sdks/ocr/README.md#process) - OCR
577568

USAGE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ with Mistral(
2929
</br>
3030

3131
The same SDK client can also be used to make asynchronous requests by importing asyncio.
32+
3233
```python
3334
# Asynchronous Example
3435
import asyncio
@@ -82,6 +83,7 @@ with Mistral(
8283
</br>
8384

8485
The same SDK client can also be used to make asynchronous requests by importing asyncio.
86+
8587
```python
8688
# Asynchronous Example
8789
import asyncio
@@ -135,6 +137,7 @@ with Mistral(
135137
</br>
136138

137139
The same SDK client can also be used to make asynchronous requests by importing asyncio.
140+
138141
```python
139142
# Asynchronous Example
140143
import asyncio
@@ -188,6 +191,7 @@ with Mistral(
188191
</br>
189192

190193
The same SDK client can also be used to make asynchronous requests by importing asyncio.
194+
191195
```python
192196
# Asynchronous Example
193197
import asyncio

docs/sdks/accesses/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Accesses
2-
(*beta.libraries.accesses*)
1+
# Beta.Libraries.Accesses
32

43
## Overview
54

docs/sdks/agents/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Agents
2-
(*agents*)
32

43
## Overview
54

docs/sdks/chat/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Chat
2-
(*chat*)
32

43
## Overview
54

0 commit comments

Comments
 (0)