Skip to content

Commit 2165cdf

Browse files
Workflow encoding feature (offloading / encryption)
1 parent f0969ad commit 2165cdf

18 files changed

Lines changed: 2315 additions & 18 deletions

.speakeasy/gen.lock

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ management:
55
docVersion: 1.0.0
66
speakeasyVersion: 1.761.1
77
generationVersion: 2.879.6
8-
releaseVersion: 2.3.1
9-
configChecksum: cfc814ae7d34226a7aa57f42b133b76e
8+
releaseVersion: 2.3.0
9+
configChecksum: 23f8bedccc0eae8d219fc0f204f0d860
1010
repoURL: https://github.com/mistralai/client-python.git
1111
installationURL: https://github.com/mistralai/client-python.git
1212
published: true
1313
persistentEdits:
14-
generation_id: da4d1522-be42-4fed-8e47-6a1a86083dd9
15-
pristine_commit_hash: 0af2a650df50ba629dd4358d9ecd97a7a865b28a
16-
pristine_tree_hash: 21954a44b6b1fcad3bcbbb7ec53a7846e7141605
14+
generation_id: fe142125-1872-4182-81ba-bc06f9c54162
15+
pristine_commit_hash: 35add5123f1208507e0bfe5ca855b6de0b6b252b
16+
pristine_tree_hash: 31fb38dc60d808cfb99e3bd8405df845ece4b4b2
1717
features:
1818
python:
1919
acceptHeaders: 3.0.0
@@ -61,7 +61,6 @@ trackedFiles:
6161
id: 89aa447020cd
6262
last_write_checksum: sha1:f84632c81029fcdda8c3b0c768d02b836fc80526
6363
pristine_git_object: 8d79f0abb72526f1fb34a4c03e5bba612c6ba2ae
64-
deleted: true
6564
USAGE.md:
6665
id: 3aed33ce6e6f
6766
last_write_checksum: sha1:d172deb3ee1630f16b279de22aec1f8f68d7565f
@@ -2666,6 +2665,11 @@ trackedFiles:
26662665
id: 5e2ddf7b3863
26672666
last_write_checksum: sha1:3aa9c92e9872fe75032e53e311bf050dbab51e98
26682667
pristine_git_object: 2a64e130e526f8d99e623e7cbc0c7add82d8fab0
2668+
docs/models/tooltypes.md:
2669+
id: adb50fe63ea2
2670+
last_write_checksum: sha1:d0d67b717773cbc99add6716e0287e64f04d24df
2671+
pristine_git_object: 345ee7dc07187e1ee06726ec63ffb75e1a34e736
2672+
deleted: true
26692673
docs/models/trainingfile.md:
26702674
id: 4039958e8930
26712675
last_write_checksum: sha1:d02543c2d1446e56501f2ac358a09669b0077648
@@ -2874,6 +2878,11 @@ trackedFiles:
28742878
id: fc4df52fb9b5
28752879
last_write_checksum: sha1:72636dc7ae74264bb5158d284ef6f83da5290b27
28762880
pristine_git_object: 4ca7333c412ad819e3e02c61debe402e3f9b0af9
2881+
docs/models/workerinfo.md:
2882+
id: f8e56340a1d8
2883+
last_write_checksum: sha1:29c6d1ac23a55a0a8ecb108833c516332d358b11
2884+
pristine_git_object: 997f62ab0242d0017871a434ffbfbc2c58c69294
2885+
deleted: true
28772886
docs/models/workflow.md:
28782887
id: a782201b7327
28792888
last_write_checksum: sha1:0a6dbea734dc94626fb53ab37c619fef48b9db63
@@ -3194,6 +3203,11 @@ trackedFiles:
31943203
id: 4f1a657c8f68
31953204
last_write_checksum: sha1:8ddfebe91ff50ea863d4c0bd85c75458a482667e
31963205
pristine_git_object: 3b4d135f39bdfc3237c36c03367952eae54bdd48
3206+
docs/sdks/workers/README.md:
3207+
id: aaba95bc3191
3208+
last_write_checksum: sha1:d940b7a4fc0866c94714f1e2a994cf08f1f83b58
3209+
pristine_git_object: 5e2380d1d15afd204e20d0a16adc84f30e91e041
3210+
deleted: true
31973211
docs/sdks/workflows/README.md:
31983212
id: 80c76ce944c0
31993213
last_write_checksum: sha1:af6d1ec6698a8d58a743d67e897910038bed299a
@@ -3228,8 +3242,8 @@ trackedFiles:
32283242
pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c
32293243
src/mistralai/client/_version.py:
32303244
id: cc807b30de19
3231-
last_write_checksum: sha1:9a1feeb59a26a1eef191112013191e9f32399ef6
3232-
pristine_git_object: aa94ac8d12a7009a1cd3a1c33379fe4b341e71c2
3245+
last_write_checksum: sha1:421e56bc3992cac6dd6e90992f219ac2a798fea0
3246+
pristine_git_object: 0a44f4d847ea627a02c57dd61fb3f5c691327131
32333247
src/mistralai/client/accesses.py:
32343248
id: 76fc53bfcf59
32353249
last_write_checksum: sha1:0c417e7a0bf9dfc523dbabee816b73d7a4d52f1d
@@ -5386,6 +5400,11 @@ trackedFiles:
53865400
id: cbe8c44aee50
53875401
last_write_checksum: sha1:53949106f192944a13a8fcbeb37b3d08478b7bbc
53885402
pristine_git_object: 1a7781fc2c1001002785d512ed7909ce91a9129f
5403+
src/mistralai/client/models/tooltypes.py:
5404+
id: 86c3b54272fd
5405+
last_write_checksum: sha1:e90c15c1e645a5f207af0c7ac728cb0a521c6706
5406+
pristine_git_object: e601c1967c42ef8d0c2eea98bc5c0ca722cde066
5407+
deleted: true
53895408
src/mistralai/client/models/trainingfile.py:
53905409
id: 2edf9bce227d
53915410
last_write_checksum: sha1:f72468d666e903a966c12273be5a64048dcd59a0
@@ -5566,6 +5585,11 @@ trackedFiles:
55665585
id: 26b0903423e5
55675586
last_write_checksum: sha1:e486f50095cc7540ce828fff7571c6aa6748bf2f
55685587
pristine_git_object: f82b6ec1c89cae83ea21d9bae12a1984679262ae
5588+
src/mistralai/client/models/workerinfo.py:
5589+
id: 0c231087534e
5590+
last_write_checksum: sha1:0d9e4e56c7a4c570ccf49bcdc835b33f7500629b
5591+
pristine_git_object: 65edcec61125e3276bddabf424ec289667b3b671
5592+
deleted: true
55695593
src/mistralai/client/models/workflow.py:
55705594
id: 1548cd73984e
55715595
last_write_checksum: sha1:14e1db57af8784d77633d7dc1d22198f2377909b
@@ -5788,8 +5812,8 @@ trackedFiles:
57885812
pristine_git_object: d036900982e6db67d9d3f79f4e906541a1af0179
57895813
src/mistralai/client/sdk.py:
57905814
id: 48edbcb38d7e
5791-
last_write_checksum: sha1:a606046063cd946633918efa1662846c987c9b7e
5792-
pristine_git_object: 03338f46bd3d32f1770ed9b6e4d30f9d707867df
5815+
last_write_checksum: sha1:92a9a2ed0c76f0d2a94ff6199148340039af33d5
5816+
pristine_git_object: b06724d8f1d9111d5aa9beebe9f3d89a798c3e1c
57935817
src/mistralai/client/sdkconfiguration.py:
57945818
id: b7dd68a0235e
57955819
last_write_checksum: sha1:c6944f12c6fdc992d43db943b24c8c90854cde5e
@@ -5890,6 +5914,11 @@ trackedFiles:
58905914
id: ab76b1377d79
58915915
last_write_checksum: sha1:c46a418a865955ab8b72d7d2584ba9b758f75165
58925916
pristine_git_object: c4f1a71e1da1cb4ebda3ef4fb69cbbe98370d2ae
5917+
src/mistralai/client/workers.py:
5918+
id: 54a46aba8359
5919+
last_write_checksum: sha1:009ae7cbfc6ff8eb8bf29a6ccca93192ef643416
5920+
pristine_git_object: e2d41c70ecaeec1439ff9398b79de2af7eca54f1
5921+
deleted: true
58935922
src/mistralai/client/workflows.py:
58945923
id: e2a0381191f6
58955924
last_write_checksum: sha1:643f6debca318789195f27e7ccf9ff959d558f46
@@ -8312,7 +8341,6 @@ examples:
83128341
application/json: {"scheduler_url": "https://closed-passport.info/", "namespace": "<value>", "tls": false}
83138342
examplesVersion: 1.0.2
83148343
generatedTests: {}
8315-
releaseNotes: "## Python SDK Changes:\n* `mistral.ocr.process()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.pages[]` **Changed**\n* `mistral.chat.complete()`: `response.choices[]` **Changed**\n* `mistral.fim.complete()`: `response.choices[]` **Changed**\n* `mistral.agents.complete()`: `response.choices[]` **Changed**\n* `mistral.workflows.executions.stream()`: `request.event_source` **Changed**\n"
83168344
generatedFiles:
83178345
- .gitattributes
83188346
- .vscode/settings.json

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ generation:
3232
generateNewTests: false
3333
skipResponseBodyAssertions: false
3434
python:
35-
version: 2.3.1
35+
version: 2.3.0
3636
additionalDependencies:
3737
dev:
3838
pytest: ^8.2.2

.speakeasy/workflow.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ targets:
4141
sourceRevisionDigest: sha256:4d69c08534e6e63c9fadb6f11344bf178f9dbf962fe0e319013c96096a0b5244
4242
sourceBlobDigest: sha256:3cbfbae3d8be0884f2d588d3f9eec1b70c811931631a7ac240b7e7444cc081da
4343
codeSamplesNamespace: mistral-openapi-code-samples
44-
codeSamplesRevisionDigest: sha256:6afb787e5bd692753cade5670341d5cfd2307608034185cd6641ac02990b7104
44+
codeSamplesRevisionDigest: sha256:0abd47e1cec85efd5b5949d51c5763e0622bb6dd1d7abab906f20318272977fa
4545
workflow:
4646
workflowVersion: 1.0.0
4747
speakeasyVersion: 1.761.1

pyproject.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,27 @@ realtime = [
3030
"websockets >=13.0",
3131
]
3232

33+
workflow_payload_offloading_azure = [
34+
"azure-storage-blob[aio]>=12.28.0,<13.0.0",
35+
]
36+
workflow_payload_offloading_gcs = [
37+
"gcloud-aio-storage>=9.3.0,<10.0.0",
38+
"opentelemetry-instrumentation-aiohttp-client>=0.60b1,<0.61", # For observability
39+
]
40+
workflow_payload_offloading_s3 = [
41+
"aioboto3>=12.4.0,<13.0.0",
42+
]
43+
44+
workflow_payload_offloading = [
45+
"mistralai[workflow_payload_offloading_azure]",
46+
"mistralai[workflow_payload_offloading_gcs]",
47+
"mistralai[workflow_payload_offloading_s3]",
48+
]
49+
workflow_payload_encryption = [
50+
"cryptography>=41.0.0,<47.0.0",
51+
]
52+
53+
3354
[project.urls]
3455
Repository = "https://github.com/mistralai/client-python.git"
3556

src/mistralai/client/_hooks/registration.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from .traceparent import TraceparentInjectionHook
44
from .tracing import TracingHook
55
from .types import Hooks
6+
from .workflow_encoding_hook import WorkflowEncodingHook
67

78
# This file is only ever generated once on the first generation and then is free to be modified.
89
# Any hooks you wish to add should be registered in the init_hooks function. Feel free to define them
@@ -16,9 +17,12 @@ def init_hooks(hooks: Hooks):
1617
Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance
1718
"""
1819
tracing_hook = TracingHook()
20+
workflow_encoding_hook = WorkflowEncodingHook()
1921
hooks.register_before_request_hook(CustomUserAgentHook())
2022
hooks.register_before_request_hook(TraceparentInjectionHook())
2123
hooks.register_after_success_hook(DeprecationWarningHook())
2224
hooks.register_after_success_hook(tracing_hook)
2325
hooks.register_before_request_hook(tracing_hook)
2426
hooks.register_after_error_hook(tracing_hook)
27+
hooks.register_before_request_hook(workflow_encoding_hook)
28+
hooks.register_after_success_hook(workflow_encoding_hook)

0 commit comments

Comments
 (0)