From 0e64a276f26265f262626ed05e5504969d4368a3 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 3 Apr 2026 10:25:55 +0000 Subject: [PATCH 1/4] =?UTF-8?q?##=20Python=20SDK=20Changes:=20*=20`mistral?= =?UTF-8?q?.models.list()`:=20=20`response.data[].union(fine-tuned).job`?= =?UTF-8?q?=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`mistral?= =?UTF-8?q?.models.retrieve()`:=20=20`response.union(fine-tuned).job`=20**?= =?UTF-8?q?Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`mistral.chat?= =?UTF-8?q?.complete()`:=20=20=20*=20=20`request`=20**Changed**=20(Breakin?= =?UTF-8?q?g=20=E2=9A=A0=EF=B8=8F)=20=20=20*=20=20`response.choices[].mess?= =?UTF-8?q?age.tool=5Fcalls[].type`=20**Changed**=20(Breaking=20=E2=9A=A0?= =?UTF-8?q?=EF=B8=8F)=20*=20`mistral.chat.stream()`:=20=20=20*=20=20`reque?= =?UTF-8?q?st`=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20=20=20*?= =?UTF-8?q?=20=20`response.[].data.choices[].delta.tool=5Fcalls[].type`=20?= =?UTF-8?q?**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`mistral.fi?= =?UTF-8?q?m.complete()`:=20=20`response.choices[].message.tool=5Fcalls[].?= =?UTF-8?q?type`=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`mi?= =?UTF-8?q?stral.fim.stream()`:=20=20`response.[].data.choices[].delta.too?= =?UTF-8?q?l=5Fcalls[].type`=20**Changed**=20(Breaking=20=E2=9A=A0?= =?UTF-8?q?=EF=B8=8F)=20*=20`mistral.workflows.get=5Fworkflow=5Fregistrati?= =?UTF-8?q?on()`:=20=20`response.workflow=5Fregistration`=20**Changed**=20?= =?UTF-8?q?(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`mistral.workflows.execut?= =?UTF-8?q?e=5Fworkflow=5Fregistration()`:=20=20`request.input`=20**Change?= =?UTF-8?q?d**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`mistral.workflows.?= =?UTF-8?q?execute=5Fworkflow()`:=20=20`request.input`=20**Changed**=20(Br?= =?UTF-8?q?eaking=20=E2=9A=A0=EF=B8=8F)=20*=20`mistral.workflows.get=5Fwor?= =?UTF-8?q?kflow=5Fregistrations()`:=20=20`response.workflow=5Fregistratio?= =?UTF-8?q?ns[]`=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`mi?= =?UTF-8?q?stral.classifiers.classify=5Fchat()`:=20=20=20*=20=20`request.i?= =?UTF-8?q?nput.union(Array)[].messages[].union(assistant?= =?UTF-8?q?).tool=5Fcalls[].type`=20**Changed**=20(Breaking=20=E2=9A=A0?= =?UTF-8?q?=EF=B8=8F)=20*=20`mistral.classifiers.moderate=5Fchat()`:=20=20?= =?UTF-8?q?=20*=20=20`request.inputs.union(Array<>)[].union(assistant).too?= =?UTF-8?q?l=5Fcalls[].type`=20**Changed**=20(Breaking=20=E2=9A=A0?= =?UTF-8?q?=EF=B8=8F)=20*=20`mistral.agents.stream()`:=20=20=20*=20=20`req?= =?UTF-8?q?uest`=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20=20=20*?= =?UTF-8?q?=20=20`response.[].data.choices[].delta.tool=5Fcalls[].type`=20?= =?UTF-8?q?**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`mistral.ag?= =?UTF-8?q?ents.complete()`:=20=20=20*=20=20`request`=20**Changed**=20(Bre?= =?UTF-8?q?aking=20=E2=9A=A0=EF=B8=8F)=20=20=20*=20=20`response.choices[].?= =?UTF-8?q?message.tool=5Fcalls[].type`=20**Changed**=20(Breaking=20?= =?UTF-8?q?=E2=9A=A0=EF=B8=8F)=20*=20`mistral.beta.observability.datasets.?= =?UTF-8?q?list()`:=20=20`error.detail.error=5Fcode`=20**Changed**=20*=20`?= =?UTF-8?q?mistral.beta.observability.datasets.import=5Ffrom=5Fexplorer()`?= =?UTF-8?q?:=20=20`error.detail.error=5Fcode`=20**Changed**=20*=20`mistral?= =?UTF-8?q?.beta.observability.judges.list()`:=20=20`error.detail.error=5F?= =?UTF-8?q?code`=20**Changed**=20*=20`mistral.beta.observability.judges.fe?= =?UTF-8?q?tch()`:=20=20`error.detail.error=5Fcode`=20**Changed**=20*=20`m?= =?UTF-8?q?istral.beta.observability.judges.delete()`:=20=20`error.detail.?= =?UTF-8?q?error=5Fcode`=20**Changed**=20*=20`mistral.beta.observability.j?= =?UTF-8?q?udges.update()`:=20=20`error.detail.error=5Fcode`=20**Changed**?= =?UTF-8?q?=20*=20`mistral.beta.observability.judges.judge=5Fconversation(?= =?UTF-8?q?)`:=20=20`error.detail.error=5Fcode`=20**Changed**=20*=20`mistr?= =?UTF-8?q?al.beta.observability.campaigns.create()`:=20=20`error.detail.e?= =?UTF-8?q?rror=5Fcode`=20**Changed**=20*=20`mistral.beta.observability.ca?= =?UTF-8?q?mpaigns.list()`:=20=20`error.detail.error=5Fcode`=20**Changed**?= =?UTF-8?q?=20*=20`mistral.beta.observability.campaigns.fetch()`:=20=20`er?= =?UTF-8?q?ror.detail.error=5Fcode`=20**Changed**=20*=20`mistral.beta.obse?= =?UTF-8?q?rvability.campaigns.delete()`:=20=20`error.detail.error=5Fcode`?= =?UTF-8?q?=20**Changed**=20*=20`mistral.beta.observability.campaigns.fetc?= =?UTF-8?q?h=5Fstatus()`:=20=20`error.detail.error=5Fcode`=20**Changed**?= =?UTF-8?q?=20*=20`mistral.beta.observability.campaigns.list=5Fevents()`:?= =?UTF-8?q?=20=20`error.detail.error=5Fcode`=20**Changed**=20*=20`mistral.?= =?UTF-8?q?beta.observability.datasets.create()`:=20=20`error.detail.error?= =?UTF-8?q?=5Fcode`=20**Changed**=20*=20`mistral.beta.observability.chat?= =?UTF-8?q?=5Fcompletion=5Fevents.fields.fetch=5Foption=5Fcounts()`:=20=20?= =?UTF-8?q?`error.detail.error=5Fcode`=20**Changed**=20*=20`mistral.beta.o?= =?UTF-8?q?bservability.datasets.fetch()`:=20=20`error.detail.error=5Fcode?= =?UTF-8?q?`=20**Changed**=20*=20`mistral.beta.observability.datasets.dele?= =?UTF-8?q?te()`:=20=20`error.detail.error=5Fcode`=20**Changed**=20*=20`mi?= =?UTF-8?q?stral.beta.observability.datasets.update()`:=20=20`error.detail?= =?UTF-8?q?.error=5Fcode`=20**Changed**=20*=20`mistral.beta.observability.?= =?UTF-8?q?datasets.list=5Frecords()`:=20=20`error.detail.error=5Fcode`=20?= =?UTF-8?q?**Changed**=20*=20`mistral.beta.observability.datasets.create?= =?UTF-8?q?=5Frecord()`:=20=20`error.detail.error=5Fcode`=20**Changed**=20?= =?UTF-8?q?*=20`mistral.beta.observability.datasets.import=5Ffrom=5Fcampai?= =?UTF-8?q?gn()`:=20=20`error.detail.error=5Fcode`=20**Changed**=20*=20`mi?= =?UTF-8?q?stral.beta.observability.judges.create()`:=20=20`error.detail.e?= =?UTF-8?q?rror=5Fcode`=20**Changed**=20*=20`mistral.beta.observability.da?= =?UTF-8?q?tasets.import=5Ffrom=5Ffile()`:=20=20`error.detail.error=5Fcode?= =?UTF-8?q?`=20**Changed**=20*=20`mistral.beta.observability.datasets.impo?= =?UTF-8?q?rt=5Ffrom=5Fplayground()`:=20=20`error.detail.error=5Fcode`=20*?= =?UTF-8?q?*Changed**=20*=20`mistral.beta.observability.datasets.import=5F?= =?UTF-8?q?from=5Fdataset=5Frecords()`:=20=20`error.detail.error=5Fcode`?= =?UTF-8?q?=20**Changed**=20*=20`mistral.beta.observability.datasets.expor?= =?UTF-8?q?t=5Fto=5Fjsonl()`:=20=20`error.detail.error=5Fcode`=20**Changed?= =?UTF-8?q?**=20*=20`mistral.beta.observability.datasets.fetch=5Ftask()`:?= =?UTF-8?q?=20=20`error.detail.error=5Fcode`=20**Changed**=20*=20`mistral.?= =?UTF-8?q?beta.observability.datasets.list=5Ftasks()`:=20=20`error.detail?= =?UTF-8?q?.error=5Fcode`=20**Changed**=20*=20`mistral.beta.observability.?= =?UTF-8?q?datasets.records.fetch()`:=20=20`error.detail.error=5Fcode`=20*?= =?UTF-8?q?*Changed**=20*=20`mistral.beta.observability.datasets.records.d?= =?UTF-8?q?elete()`:=20=20`error.detail.error=5Fcode`=20**Changed**=20*=20?= =?UTF-8?q?`mistral.beta.observability.chat=5Fcompletion=5Fevents.fields.f?= =?UTF-8?q?etch=5Foptions()`:=20=20`error.detail.error=5Fcode`=20**Changed?= =?UTF-8?q?**=20*=20`mistral.beta.observability.chat=5Fcompletion=5Fevents?= =?UTF-8?q?.fields.list()`:=20=20`error.detail.error=5Fcode`=20**Changed**?= =?UTF-8?q?=20*=20`mistral.beta.observability.chat=5Fcompletion=5Fevents.j?= =?UTF-8?q?udge()`:=20=20`error.detail.error=5Fcode`=20**Changed**=20*=20`?= =?UTF-8?q?mistral.beta.observability.chat=5Fcompletion=5Fevents.fetch=5Fs?= =?UTF-8?q?imilar=5Fevents()`:=20=20`error.detail.error=5Fcode`=20**Change?= =?UTF-8?q?d**=20*=20`mistral.beta.observability.chat=5Fcompletion=5Fevent?= =?UTF-8?q?s.fetch()`:=20=20`error.detail.error=5Fcode`=20**Changed**=20*?= =?UTF-8?q?=20`mistral.beta.observability.chat=5Fcompletion=5Fevents.searc?= =?UTF-8?q?h=5Fids()`:=20=20`error.detail.error=5Fcode`=20**Changed**=20*?= =?UTF-8?q?=20`mistral.beta.observability.chat=5Fcompletion=5Fevents.searc?= =?UTF-8?q?h()`:=20=20`error.detail.error=5Fcode`=20**Changed**=20*=20`mis?= =?UTF-8?q?tral.workflows.workers.whoami()`:=20**Removed**=20(Breaking=20?= =?UTF-8?q?=E2=9A=A0=EF=B8=8F)=20*=20`mistral.beta.observability.datasets.?= =?UTF-8?q?records.bulk=5Fdelete()`:=20=20`error.detail.error=5Fcode`=20**?= =?UTF-8?q?Changed**=20*=20`mistral.beta.observability.datasets.records.ju?= =?UTF-8?q?dge()`:=20=20`error.detail.error=5Fcode`=20**Changed**=20*=20`m?= =?UTF-8?q?istral.beta.observability.datasets.records.update=5Fpayload()`:?= =?UTF-8?q?=20=20`error.detail.error=5Fcode`=20**Changed**=20*=20`mistral.?= =?UTF-8?q?beta.observability.datasets.records.update=5Fproperties()`:=20?= =?UTF-8?q?=20`error.detail.error=5Fcode`=20**Changed**?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .speakeasy/gen.lock | 237 +++++++++--------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 14 +- README-PYPI.md | 8 +- README.md | 8 +- RELEASES.md | 12 +- docs/models/agentscompletionrequest.md | 2 +- docs/models/agentscompletionrequesttool.md | 47 ++++ docs/models/agentscompletionstreamrequest.md | 2 +- .../agentscompletionstreamrequesttool.md | 47 ++++ docs/models/chatcompletionrequest.md | 2 +- docs/models/chatcompletionrequesttool.md | 47 ++++ docs/models/chatcompletionstreamrequest.md | 2 +- .../models/chatcompletionstreamrequesttool.md | 47 ++++ .../filesapiroutesgetsignedurlrequest.md | 8 +- docs/models/ftmodelcard.md | 2 +- docs/models/library.md | 36 +-- docs/models/observabilityerrorcode.md | 3 + docs/models/tool.md | 8 +- docs/models/toolcall.md | 12 +- docs/models/toolchoice.md | 2 +- docs/models/tooltypes.md | 17 -- docs/models/workerinfo.md | 10 - docs/models/workflowexecutionrequest.md | 2 +- docs/models/workflowregistration.md | 17 +- .../workflowregistrationwithworkerstatus.md | 19 +- docs/sdks/agents/README.md | 4 +- docs/sdks/chat/README.md | 4 +- docs/sdks/files/README.md | 10 +- docs/sdks/workers/README.md | 46 ---- docs/sdks/workflows/README.md | 4 +- src/mistralai/client/_version.py | 6 +- src/mistralai/client/agents.py | 36 ++- src/mistralai/client/basesdk.py | 15 +- src/mistralai/client/chat.py | 36 ++- src/mistralai/client/files.py | 4 +- src/mistralai/client/models/__init__.py | 32 ++- .../client/models/agentscompletionrequest.py | 35 ++- .../models/agentscompletionstreamrequest.py | 35 ++- .../client/models/chatcompletionrequest.py | 35 ++- .../models/chatcompletionstreamrequest.py | 35 ++- .../files_api_routes_get_signed_urlop.py | 4 +- src/mistralai/client/models/ftmodelcard.py | 8 +- src/mistralai/client/models/library.py | 10 +- .../client/models/observabilityerrorcode.py | 3 + src/mistralai/client/models/tool.py | 39 ++- src/mistralai/client/models/toolcall.py | 5 +- src/mistralai/client/models/toolchoice.py | 5 +- src/mistralai/client/models/tooltypes.py | 9 - src/mistralai/client/models/workerinfo.py | 38 --- .../client/models/workflowexecutionrequest.py | 8 +- .../client/models/workflowregistration.py | 34 ++- .../workflowregistrationwithworkerstatus.py | 34 ++- src/mistralai/client/runs.py | 10 +- src/mistralai/client/utils/metadata.py | 1 + src/mistralai/client/utils/security.py | 31 ++- src/mistralai/client/utils/serializers.py | 12 +- src/mistralai/client/workers.py | 162 ------------ src/mistralai/client/workflows.py | 29 ++- 59 files changed, 777 insertions(+), 615 deletions(-) create mode 100644 docs/models/agentscompletionrequesttool.md create mode 100644 docs/models/agentscompletionstreamrequesttool.md create mode 100644 docs/models/chatcompletionrequesttool.md create mode 100644 docs/models/chatcompletionstreamrequesttool.md delete mode 100644 docs/models/tooltypes.md delete mode 100644 docs/models/workerinfo.md delete mode 100644 docs/sdks/workers/README.md delete mode 100644 src/mistralai/client/models/tooltypes.py delete mode 100644 src/mistralai/client/models/workerinfo.py delete mode 100644 src/mistralai/client/workers.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index cd97e129..7d7ed364 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: 42ee0bdf8fcf0fa3ee261db644fe8154 + docChecksum: 18c6f765962433b99ed0f7ffc3bf8708 docVersion: 1.0.0 - speakeasyVersion: 1.754.0 - generationVersion: 2.862.0 - releaseVersion: 2.2.0 - configChecksum: ed5cc4cf5a87eaacbf1b77366abd2467 + speakeasyVersion: 1.761.1 + generationVersion: 2.879.6 + releaseVersion: 2.2.1 + configChecksum: d39c00303cffb2a9684327475a8b6933 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 6b0c3b1d-b7b3-4318-b2a1-5d44dd7fa3ac - pristine_commit_hash: 2e766581e0b9c6c42cbd61b500b0b6469a27a175 - pristine_tree_hash: ded10775e62be5fb057ebf7819d56da121f02829 + generation_id: d31ade65-c12a-4e7a-9366-d4e830f847d3 + pristine_commit_hash: 2b1ed02308e1cbc506943c62626d1142c08343a1 + pristine_tree_hash: 62a467dadf7d7c1f92b7ba79786982c82623bd11 features: python: acceptHeaders: 3.0.0 @@ -21,7 +21,7 @@ features: additionalProperties: 1.0.1 configurableModuleName: 0.2.0 constsAndDefaults: 1.0.7 - core: 6.0.18 + core: 6.0.21 customCodeRegions: 0.1.1 defaultEnabledRetries: 0.2.0 deprecations: 3.0.2 @@ -32,7 +32,7 @@ features: examples: 3.0.3 flatRequests: 1.0.1 flattening: 3.1.1 - globalSecurity: 3.0.5 + globalSecurity: 3.0.7 globalSecurityCallbacks: 1.0.0 globalSecurityFlattening: 1.0.0 globalServerURLs: 3.2.1 @@ -42,7 +42,7 @@ features: nameOverrides: 3.0.3 nullables: 1.0.2 openEnums: 1.0.4 - pagination: 3.0.7 + pagination: 3.0.9 responseFormat: 1.1.0 retries: 3.0.4 sdkHooks: 1.2.1 @@ -219,8 +219,8 @@ trackedFiles: pristine_git_object: 7548286af5d1db51fbfd29c893eb8afdc3c97c4d docs/models/agentscompletionrequest.md: id: 906b82c214dc - last_write_checksum: sha1:7932ecb14b0e32f46e5a4b97c83581ecdca53ddf - pristine_git_object: 99f47f5cedb79f44393f0cdb3c9a26660500cdee + last_write_checksum: sha1:d82104cf412985096b5de894972e16cc077df890 + pristine_git_object: 8627e359e0b7d0f619cc3ca060dd3d43799dd022 docs/models/agentscompletionrequestmessage.md: id: 5337f0644b40 last_write_checksum: sha1:ecf7b7cdf0d24a5e97b520366cf816b8731734bb @@ -229,14 +229,18 @@ trackedFiles: id: ad1e0e74b6b8 last_write_checksum: sha1:b2422d4dada80d54b2dd499a6659a3894318d2c9 pristine_git_object: 21ce6fb539238168e6d1dfc5a8206d55d33018d3 + docs/models/agentscompletionrequesttool.md: + id: 242b6dce104d + last_write_checksum: sha1:1ba227813be0c1047edfaf41b00bc14506374878 + pristine_git_object: c20358664c677d0e6c4179a7ac44c7e633125352 docs/models/agentscompletionrequesttoolchoice.md: id: bd8a6f9fbb47 last_write_checksum: sha1:f3d9ec3c82b6bbd2c3cbc320a71b927edcc292b1 pristine_git_object: 63b9dca9fbb8d829f93d8327a77fbc385a846c76 docs/models/agentscompletionstreamrequest.md: id: 21d09756447b - last_write_checksum: sha1:021b53d01c8f46c2a074defbb08736752e99ad9c - pristine_git_object: d5455230b1b5d640c19e1ee0f1c29361674077a7 + last_write_checksum: sha1:098b9d9c3a411d93d79cc98806933910d5cc66f4 + pristine_git_object: 3845f08c4525e95c6bb639628a1cd7a95f15d873 docs/models/agentscompletionstreamrequestmessage.md: id: b309ade92081 last_write_checksum: sha1:98744c9646969250242cbbfbdf428dbd7030e4bb @@ -245,6 +249,10 @@ trackedFiles: id: 4925b6b8fbca last_write_checksum: sha1:c9d0d73ca46643ffdf02e6c6cd35de5c39460c20 pristine_git_object: 981005f3ff2277eae57c56787edb5f1f62d1fe46 + docs/models/agentscompletionstreamrequesttool.md: + id: 03d75b677f51 + last_write_checksum: sha1:3e9ef8be5631387c05584ba64f66f5b6fe2d4386 + pristine_git_object: 6a11b0420d94f7c42ea1ffa6b7577552f1d3c0d1 docs/models/agentscompletionstreamrequesttoolchoice.md: id: b1f76f7a4e1c last_write_checksum: sha1:843c4946d5cab61df2cba458af40835c4e8bcafe @@ -427,8 +435,8 @@ trackedFiles: pristine_git_object: dd2138278eb73abffc15fdc2583fe61c6c1f17d1 docs/models/chatcompletionrequest.md: id: adffe90369d0 - last_write_checksum: sha1:9979175951fd1540db1660f0c3494217b80cde61 - pristine_git_object: d335f908276165dfc7d1b92f55ff246fcf6d2e8a + last_write_checksum: sha1:1664a70123e7e32aaba37672226e484770646607 + pristine_git_object: e04543a239686086db9ea00b278567d82d30e2df docs/models/chatcompletionrequestmessage.md: id: 3f5e170d418c last_write_checksum: sha1:7921c5a508a9f88adc01caab34e26182b8035607 @@ -437,6 +445,10 @@ trackedFiles: id: fcaf5bbea451 last_write_checksum: sha1:71a25f84f0d88c7acf72e801ced6159546201851 pristine_git_object: 749296d420c0671d2a1d6d22483b51f577a86485 + docs/models/chatcompletionrequesttool.md: + id: 01554a1b158a + last_write_checksum: sha1:e7259e65ba3c614e5e70d0d55c88db03e90097d0 + pristine_git_object: 572d12ca006caead244387a5e91000ac33b0aa0e docs/models/chatcompletionrequesttoolchoice.md: id: b97041b2f15b last_write_checksum: sha1:7ad7eb133f70e07d0d6a9def36aadd08b35cf861 @@ -447,8 +459,8 @@ trackedFiles: pristine_git_object: a0465ffbfc5558628953e03fbc53b80bbdc8649b docs/models/chatcompletionstreamrequest.md: id: cf8f29558a68 - last_write_checksum: sha1:213564d7a2848ad3d390419c7e12a6b11c79982a - pristine_git_object: 9d50902fe8205ab7fc646074509a1ebf5e480eab + last_write_checksum: sha1:3b794d280680af826347e708f87e9de749af202b + pristine_git_object: 9c8cdb168578ff94cb2e69989110be33aaaf9759 docs/models/chatcompletionstreamrequestmessage.md: id: 053a98476cd2 last_write_checksum: sha1:8270692463fab1243d9de4bbef7162daa64e52c5 @@ -457,6 +469,10 @@ trackedFiles: id: d0e89a4dca78 last_write_checksum: sha1:a889e9580fa94bda7c848682d6ba501b7f5c0f41 pristine_git_object: a48460a92ac47fec1de2188ba46b238229736d32 + docs/models/chatcompletionstreamrequesttool.md: + id: cbfb16fb3b03 + last_write_checksum: sha1:163ad1e31d7ba4eaef7797b399d1323465e97110 + pristine_git_object: 48998fcbb16a8ce5f5a4fd8b2794125d97e935ac docs/models/chatcompletionstreamrequesttoolchoice.md: id: 210d5e5b1413 last_write_checksum: sha1:0543164caf3f4fb2bef3061dbd1a5e6b34b17ae9 @@ -1147,8 +1163,8 @@ trackedFiles: pristine_git_object: 8b28cb0e5c60ac9676656624eb3c2c6fdc8a3e88 docs/models/filesapiroutesgetsignedurlrequest.md: id: 08f3772db370 - last_write_checksum: sha1:26aa0140444ccef7307ef6f236932032e4784e8f - pristine_git_object: dbe3c801003c7bb8616f0c5be2dac2ab1e7e9fb1 + last_write_checksum: sha1:7d1577169ca1d22b3088ab1157cb49192515e6f3 + pristine_git_object: 794f25f78338baae371ebd7c653ceba2d280fdfe docs/models/filesapirouteslistfilesrequest.md: id: 04bdf7c654bd last_write_checksum: sha1:0a99755150c2ded8e5d59a96527021d29326b980 @@ -1223,8 +1239,8 @@ trackedFiles: pristine_git_object: 36d3db18679569d21e6bacfe13bcd22715372297 docs/models/ftmodelcard.md: id: 15ed6f94deea - last_write_checksum: sha1:8e1383e26d86fd247fa1762dbb0508ceed932a49 - pristine_git_object: 0381dd81d0460af3aacdf81a495c304ed9b78451 + last_write_checksum: sha1:5873780bc2a828f1164818eb9c64c3f69c6618cc + pristine_git_object: f65ff6e888a460ac5f3ad3a4556ccdd8366960c0 docs/models/function.md: id: 416a80fba031 last_write_checksum: sha1:a9485076d430a7753558461ce87bf42d09e34511 @@ -1727,8 +1743,8 @@ trackedFiles: pristine_git_object: c5c142db7aaa49990135c21eabde43b8c0fdf756 docs/models/library.md: id: e8ec114dd107 - last_write_checksum: sha1:a4d6e9a777ce3d63aac24432281933ce6e13b4a9 - pristine_git_object: 4319f43df922b4924a11d494002826cb8d6dea0b + last_write_checksum: sha1:5434149d101255cb5135f8726acdcfb29c4381bd + pristine_git_object: a07d3afac18faccb504c51f1a54cf5addc3faab3 docs/models/listbatchjobsresponse.md: id: e03025d58630 last_write_checksum: sha1:de42c9396546fc8487d0bd6ed15b4076599fa83f @@ -1967,8 +1983,8 @@ trackedFiles: pristine_git_object: 89f80436474e3c2293bb4fcafce11e626e2cdf79 docs/models/observabilityerrorcode.md: id: 61d16ff95b87 - last_write_checksum: sha1:406db6551a5ee4efba4b876239245c71f0d93822 - pristine_git_object: d121b2641c0f58c62c3b3cc73c5fdffe5e7c1d92 + last_write_checksum: sha1:e5b3959fbd1febe3c727d1e93c8df71f31b2ae9f + pristine_git_object: c2afc4d0a5b26d3b1fa83a1169e7625012340137 docs/models/observabilityerrordetail.md: id: 38061447dfbb last_write_checksum: sha1:1da7bf6e72c2f972b0e22f0201a1cb9b76f53ccd @@ -2543,24 +2559,24 @@ trackedFiles: pristine_git_object: 4c84779c4d2e8bf2a2fe258c2b350b05d047f2e3 docs/models/tool.md: id: 8966139dbeed - last_write_checksum: sha1:1725bf53fc9f1ca3f332322d91de24c9d58adc6a - pristine_git_object: fb661f72887271d5bb470e4edf025a32b00ade17 + last_write_checksum: sha1:2ab2016846da06ab38751176ba80fb6527c2818b + pristine_git_object: 85888d01cf439be601c8d1df4048c90161cf47df docs/models/toolannotations.md: id: ac541d142ff4 last_write_checksum: sha1:54d9bfd3cd764d11cd993f7ff87784bd6d11f14d pristine_git_object: f3c8fc3cf7d9b4587b47afaf67eb14608eb58b48 docs/models/toolcall.md: id: 80892ea1a051 - last_write_checksum: sha1:cb27b9d36cfe6227978c7a7a01b1349b6bac99d9 - pristine_git_object: 3819236b9f3eee2f6878818cfbbe2817e97f7de2 + last_write_checksum: sha1:621dc83981e13cbcbc21f2e16a34178c322c4566 + pristine_git_object: 9d236e8b289977d2aa7bded0d633b224c5ec9e57 docs/models/toolcallconfirmation.md: id: 944eebb142ff last_write_checksum: sha1:864ccb39a00094d965b764235e74709945abca3d pristine_git_object: 1812f7d687d83f5692d9e79709e56813ab2c79b1 docs/models/toolchoice.md: id: "097076343426" - last_write_checksum: sha1:25b33b34da02c3b46349dc8b6223f9ae18370d16 - pristine_git_object: 373046bbbc834169293b4f4ae8b2e238f952ddde + last_write_checksum: sha1:65a2794a1102fdcba6fa5a3f497630fbaf98f94b + pristine_git_object: a457f96f6e295d590a5ef75f83a5a6c4fdd41c47 docs/models/toolchoiceenum.md: id: 15410de51ffc last_write_checksum: sha1:cdff87c62661fcb902824fda8e305c5b1b98b3d8 @@ -2633,10 +2649,6 @@ trackedFiles: id: 5e2ddf7b3863 last_write_checksum: sha1:3aa9c92e9872fe75032e53e311bf050dbab51e98 pristine_git_object: 2a64e130e526f8d99e623e7cbc0c7add82d8fab0 - docs/models/tooltypes.md: - id: adb50fe63ea2 - last_write_checksum: sha1:d0d67b717773cbc99add6716e0287e64f04d24df - pristine_git_object: 345ee7dc07187e1ee06726ec63ffb75e1a34e736 docs/models/trainingfile.md: id: 4039958e8930 last_write_checksum: sha1:d02543c2d1446e56501f2ac358a09669b0077648 @@ -2845,10 +2857,6 @@ trackedFiles: id: fc4df52fb9b5 last_write_checksum: sha1:72636dc7ae74264bb5158d284ef6f83da5290b27 pristine_git_object: 4ca7333c412ad819e3e02c61debe402e3f9b0af9 - docs/models/workerinfo.md: - id: f8e56340a1d8 - last_write_checksum: sha1:29c6d1ac23a55a0a8ecb108833c516332d358b11 - pristine_git_object: 997f62ab0242d0017871a434ffbfbc2c58c69294 docs/models/workflow.md: id: a782201b7327 last_write_checksum: sha1:0a6dbea734dc94626fb53ab37c619fef48b9db63 @@ -2911,8 +2919,8 @@ trackedFiles: pristine_git_object: ac50a894e5290f07d8531e25663baae090cf533e docs/models/workflowexecutionrequest.md: id: 44a6d9ef046a - last_write_checksum: sha1:78e3aeb9a9b13ab01906e9c2d423ac4925332dc4 - pristine_git_object: 553119b16dbc695eff102eae11e80c4426612e01 + last_write_checksum: sha1:fafbe0ccef730faa8a1689ff7525fb439e77dc48 + pristine_git_object: 54f61ea35422b37fa529e0602a338e0248c05f39 docs/models/workflowexecutionresponse.md: id: 73595cfc443f last_write_checksum: sha1:3861cb1972cca17c595d1eb23518bfa54c382e89 @@ -2983,8 +2991,8 @@ trackedFiles: pristine_git_object: 4936382b48d568309c80ba1c4c25703ef3b69659 docs/models/workflowregistration.md: id: 1d0720b1355b - last_write_checksum: sha1:2d4585a731a6c2b3ac693c21da4582c1a70d2984 - pristine_git_object: aad6831aa880c56f7001a7dfbe2a41bf5e137068 + last_write_checksum: sha1:4704d8dc8f5b961ac128ccbc4ff0e95874b8a020 + pristine_git_object: 52658c64464a744ff8f64205036a7abb6e92586d docs/models/workflowregistrationgetresponse.md: id: f2658cb29bf4 last_write_checksum: sha1:ef021920be1f1cf2016887fb1e3fb7f583c3596f @@ -2995,8 +3003,8 @@ trackedFiles: pristine_git_object: e37b36713c38a44b35d0aea4fb96cc8a44658156 docs/models/workflowregistrationwithworkerstatus.md: id: a558e858a7a9 - last_write_checksum: sha1:9eb21c738b1d1ef8421cea8145691943f2d90355 - pristine_git_object: 625871c171c9a7c6d37e03daf00274155af85218 + last_write_checksum: sha1:26d77bcd8fcfb7f2940513cc0aa2af2ca1734aca + pristine_git_object: f85563cedae6cb209614fc97ecf6dd94ef810172 docs/models/workflowschedulelistresponse.md: id: 4c425808aa60 last_write_checksum: sha1:d8e8aad7a91d7f8e398f7716109d436df6c4fc86 @@ -3051,8 +3059,8 @@ trackedFiles: pristine_git_object: 51051e2f8def9bfd6032617530ba9bead989404f docs/sdks/agents/README.md: id: 5965d8232fd8 - last_write_checksum: sha1:95844e1e50f850f71580e08ed9cd1ffdefa899bc - pristine_git_object: 46fb60ef4f92d61b2959f1b67e5f07e5bae55ba7 + last_write_checksum: sha1:6ba47b049bdd791f3129c3c2443f2f5b5a18edaa + pristine_git_object: 35c3d410b8552fb536981e824e39fe04e06cd57c docs/sdks/batchjobs/README.md: id: a3b8043c6336 last_write_checksum: sha1:ecf3800c83f9455471766e0f20a07192e76a736e @@ -3067,8 +3075,8 @@ trackedFiles: pristine_git_object: d5d7e4d4681811419874f58c294cb59688e595aa docs/sdks/chat/README.md: id: 393193527c2c - last_write_checksum: sha1:8527d41d1095e052f0b71a9e5f7075f0a722447f - pristine_git_object: 61c8813f3f168bf958edadd985875498e5205497 + last_write_checksum: sha1:d76b41db35332bb25cfa9efec945a3488604aeb0 + pristine_git_object: 03c1b7799a271a63f209894b421004beb453d29d docs/sdks/chatcompletionevents/README.md: id: 6965539e0525 last_write_checksum: sha1:ae7c0a0e7576a1114a85b9e607cb91c2ac1181a2 @@ -3115,8 +3123,8 @@ trackedFiles: pristine_git_object: 3c8424419bae5c7e6e47b4cb23e35064531a8345 docs/sdks/files/README.md: id: e576d7a117f0 - last_write_checksum: sha1:7022f6e63afea7c7988b251351d18361fd1b5e4a - pristine_git_object: 7db76611c5788e2a0440f7c95d07928851e37d6a + last_write_checksum: sha1:45265e774720742cde1c76c8be294983bf4fc77a + pristine_git_object: 246707073e9dee115d30b20a01bf728dcb43efd7 docs/sdks/fim/README.md: id: 499b227bf6ca last_write_checksum: sha1:5b2ce811df8d867d14fe0126f2c9619cca779f56 @@ -3169,14 +3177,10 @@ trackedFiles: id: 4f1a657c8f68 last_write_checksum: sha1:8ddfebe91ff50ea863d4c0bd85c75458a482667e pristine_git_object: 3b4d135f39bdfc3237c36c03367952eae54bdd48 - docs/sdks/workers/README.md: - id: aaba95bc3191 - last_write_checksum: sha1:d940b7a4fc0866c94714f1e2a994cf08f1f83b58 - pristine_git_object: 5e2380d1d15afd204e20d0a16adc84f30e91e041 docs/sdks/workflows/README.md: id: 80c76ce944c0 - last_write_checksum: sha1:572ef0ec9cadcd850e3966dad909a3d2e901280a - pristine_git_object: e65383ca453849b3bab58f921f80f5b8e7df7839 + last_write_checksum: sha1:af6d1ec6698a8d58a743d67e897910038bed299a + pristine_git_object: 324c46b14e6d1bebbfe9dda2458201cb799d67d1 docs/sdks/workflowsevents/README.md: id: 514b42269280 last_write_checksum: sha1:34971ab6eef89b115d78375a85142f3d2612f431 @@ -3207,24 +3211,24 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:e0d4cdfdf25c401429c0e9beb40be8846cb2a235 - pristine_git_object: 0473419e2e46dbf2e975a7fdcc5355d056752cdf + last_write_checksum: sha1:4c105799528d2da48c537f49f19ea75fb83807b8 + pristine_git_object: a8c34e6d26b0d4e78ff36b469b5e105525b1b135 src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:4b1cf5d760f690d35582f9037df44c97c11e7e14 pristine_git_object: 2cfdc7da91be41177f62b8ac7b2fe48aba42e496 src/mistralai/client/agents.py: id: e946546e3eaa - last_write_checksum: sha1:bd526b7613c13f07adee931996ec7fed54e72f26 - pristine_git_object: 2e91dd04aa66e340db8fe61ee8f04abf67798eaf + last_write_checksum: sha1:36fc9722264798025443263aaa3a67f6cf5844f4 + pristine_git_object: f3bd706edaf54c7741ec226c424071c29101ed08 src/mistralai/client/audio.py: id: 7a8ed2e90d61 last_write_checksum: sha1:b9dc19b4b6070baf7d8937907b8665e9f0e36afd pristine_git_object: 597954e4facba105cee62d92ea6b8c68555f63dd src/mistralai/client/basesdk.py: id: 7518c67b81ea - last_write_checksum: sha1:2cea76931db51175b2c787d0c707f08e9944c22f - pristine_git_object: a976121bd224d64497e5006cb58dd728f6a67144 + last_write_checksum: sha1:321a95c38231ed5126753702e6368a85a1af1667 + pristine_git_object: 4a27eb2ff362dd6189abfde2c8f739b70deab192 src/mistralai/client/batch.py: id: cffe114c7ac7 last_write_checksum: sha1:b452983f67b33f26e1faa60fdbbb171cb1877224 @@ -3247,8 +3251,8 @@ trackedFiles: pristine_git_object: a1ffcebc7c98a3c889ccace55c9a6c9cf3ff28df src/mistralai/client/chat.py: id: 7eba0f088d47 - last_write_checksum: sha1:dced89ea82a30a61e0c62db2f2a0c3be8a7ba099 - pristine_git_object: c11a53d1237c284ff74b5aba791bd405bac2d0ff + last_write_checksum: sha1:3cff6f0aac99282538a2486e082bd58a6953822b + pristine_git_object: 78968fcf23066b9fc408d84db513e2a289b498ed src/mistralai/client/chat_completion_events.py: id: 1813f339625b last_write_checksum: sha1:cde21c8338e4fd60143fdc6ca361c0c42ec54775 @@ -3323,8 +3327,8 @@ trackedFiles: pristine_git_object: a5b8003ca5fc766a7db89d6c95b9d0e42952af86 src/mistralai/client/files.py: id: f12df4b2ce43 - last_write_checksum: sha1:e60cfc2841ef8888a6a52479adf76ec32ecae6ac - pristine_git_object: a843cb7b2b1b55ba20093c4d43faddb972d8f645 + last_write_checksum: sha1:5599644b2c6b489365aa648fb2fb75630d2cd3e7 + pristine_git_object: 453c97c7ca5a0a02648b7848062a71a9176b7289 src/mistralai/client/fim.py: id: 217bea5d701d last_write_checksum: sha1:dc427c9e954dfb9a7fe2df8b5c544877a28cdc73 @@ -3355,8 +3359,8 @@ trackedFiles: pristine_git_object: 3df1ca56638d59e5a8bd36fd762e49fd1c5df7b9 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:6fb0669e1dbb4fcd2b249b20a6ef5f88761c2dc6 - pristine_git_object: 6c15ed3a5ea208cb974b0c5757487282a38e9cf0 + last_write_checksum: sha1:f892a946a4a176a79389c6a269c81c20fbc67dc3 + pristine_git_object: 5e03fddf3dc1714611a237497881d5803b7e32e9 src/mistralai/client/models/activitytaskcompletedattributesresponse.py: id: 8174941767cc last_write_checksum: sha1:8a22b80fbd7e5ea9a72a34016e68fdb4a375ed75 @@ -3491,12 +3495,12 @@ trackedFiles: pristine_git_object: 3186d5df9000d4a62c0fbc64a601e6b709803deb src/mistralai/client/models/agentscompletionrequest.py: id: 3960bc4c545f - last_write_checksum: sha1:87237462a5289c5aac2d1ce59b8b766342dd5ccd - pristine_git_object: f4ce34cb614a992f5276a1664d05426b2b16766a + last_write_checksum: sha1:864a66223d00005d44a00a171a7156f21affe113 + pristine_git_object: a919dbc37f94920eafa1cb81414afc00323fcecb src/mistralai/client/models/agentscompletionstreamrequest.py: id: 1b73f90befc2 - last_write_checksum: sha1:a449cb9287617ba7337a73777b7ab50479e7cd87 - pristine_git_object: 0feb38038f5aec52bb393c633a0913b99b1579a7 + last_write_checksum: sha1:452d2699fce04c94c58e596c19693d9dcb2fee9b + pristine_git_object: 05df8ae7ad8e7715a66e10c8e06daf267ff44acd src/mistralai/client/models/annotations.py: id: 3ae9e07de11d last_write_checksum: sha1:c015e86fa53f60f6fccce2be63b2faf8a6d81f38 @@ -3627,16 +3631,16 @@ trackedFiles: pristine_git_object: e7fef9d08ca3d8ea1fa1f63c5847a5f8a6d74201 src/mistralai/client/models/chatcompletionrequest.py: id: 9979805d8c38 - last_write_checksum: sha1:bcc680ee202ce920823502f59f8549453cf4a999 - pristine_git_object: f1b0b2d61beae2827b9f66331d74850e7c56be91 + last_write_checksum: sha1:323abe229ce9962309c98a4abe079057957e3831 + pristine_git_object: 1d0cf90d133dc843603b5d398b81c692993ddf80 src/mistralai/client/models/chatcompletionresponse.py: id: 669d996b8e82 last_write_checksum: sha1:97f164fea881127ac82303e637b6a270e200ac5b pristine_git_object: 7092bbc18425091d111ec998b33edc009ff0931b src/mistralai/client/models/chatcompletionstreamrequest.py: id: 18cb2b2415d4 - last_write_checksum: sha1:dd9dc2cd5d154e7a8e6cff928fe47582e0d4bd81 - pristine_git_object: d9f413c673b030a4ebd1cd363b0376a009b45540 + last_write_checksum: sha1:2f609b08fb18ef6cebd484d89f35de59c96ffac5 + pristine_git_object: 5cdccafb4330960b8a54475682d0939d42341903 src/mistralai/client/models/chatmoderationrequest.py: id: 057aecb07275 last_write_checksum: sha1:7677494c0e36ccbc201384cb587abeb852a1a924 @@ -4159,8 +4163,8 @@ trackedFiles: pristine_git_object: 83de8e73a3d50917e4a41bb92a828a10e646a632 src/mistralai/client/models/files_api_routes_get_signed_urlop.py: id: 0a1a18c6431e - last_write_checksum: sha1:4cf67e8cafa1f448caf9b251dd9db3e9c87d062e - pristine_git_object: 326dd1d305261acc1407e6f70100b3b59dfcee5c + last_write_checksum: sha1:46c5a0babdc6df693c03355f22131ff8d847389c + pristine_git_object: c381244b5d819e48ca7d1ad5064726fd6627cfd1 src/mistralai/client/models/files_api_routes_list_filesop.py: id: b2e92f2a29b4 last_write_checksum: sha1:18f318488f01a9a919c8650ee1f5eb825c39c91d @@ -4219,8 +4223,8 @@ trackedFiles: pristine_git_object: ccb0f21b5a69f91119bec9db6e9f3d876e4c35af src/mistralai/client/models/ftmodelcard.py: id: c4f15eed2ca2 - last_write_checksum: sha1:4382bdc5744ed2199c0aefcf32d8d9e0d02c42f4 - pristine_git_object: 922667b0f7726824d0de4b18eac2ff86b271bccb + last_write_checksum: sha1:1c3ab1bda3fa9e2df33b47a49d5e9b9e2d82a701 + pristine_git_object: bb7c52c881ceadccdeb3590104e774f3d2ad94d7 src/mistralai/client/models/function.py: id: 32275a9d8fee last_write_checksum: sha1:c01c1ed54b3086859cde0dd3c3c466c78d8323ae @@ -4663,8 +4667,8 @@ trackedFiles: pristine_git_object: 54b0ab708c665ccb841b1c8d0f2748c390850506 src/mistralai/client/models/library.py: id: 028a34b08f9c - last_write_checksum: sha1:3ac8546f2ada4f9a24d8296e03b9ad61d5f2e372 - pristine_git_object: c26710ff4818c9719e08b67d147ee9bded3dc46d + last_write_checksum: sha1:82eb895302f95f3f1a1adf85070027e22ab22350 + pristine_git_object: 0e09cfaa14040397a37ac72810521fb14fe6562f src/mistralai/client/models/list_deployments_v1_workflows_deployments_getop.py: id: 0c6586ffcab0 last_write_checksum: sha1:c7d7be66560be5bb813316f958a3fecdf7813156 @@ -4855,8 +4859,8 @@ trackedFiles: pristine_git_object: 76ebfd0de6c7457bcecb1aee026ea16ffa8a7cbd src/mistralai/client/models/observabilityerrorcode.py: id: ae572b470a30 - last_write_checksum: sha1:f52abcb9e8f504fd9993679611912d3b64270452 - pristine_git_object: 99360d410f7128756a7a7f6be6772238fa15c12f + last_write_checksum: sha1:fb2ec69dac101416f58bc9fc3e3828b3ab39e10f + pristine_git_object: f7ff71f8285e62f2bad5fd678865c96e40c38253 src/mistralai/client/models/observabilityerrordetail.py: id: cb6e8a484a38 last_write_checksum: sha1:3a7991f57573edee24780bc4b3907c8426aa3fa6 @@ -5295,24 +5299,24 @@ trackedFiles: pristine_git_object: 8d3773752444db865c0e2629ad9eed66eb7f2bc6 src/mistralai/client/models/tool.py: id: 48b4f6f50fe9 - last_write_checksum: sha1:ed3725d5da10e6a201f73724a2bbf618bdbb2a33 - pristine_git_object: 1d1c5ce557321c33b036949fa4c625fb25e38f95 + last_write_checksum: sha1:507bcbe7af5e919614c27c0704f1c26def7da2bd + pristine_git_object: a83a6d1c4f66ae2876179e4cf3967f84b013f020 src/mistralai/client/models/toolannotations.py: id: 2ae257a35b01 last_write_checksum: sha1:6f7c174966fc9a9fee5de7c8dfa4dbf2064c10e4 pristine_git_object: b2e9b94808b96b859d29c42aa0d5ca994761a395 src/mistralai/client/models/toolcall.py: id: fb34a1a3f3c2 - last_write_checksum: sha1:a0e14e69a107d88239e1ee43d2e8fd498eb034a4 - pristine_git_object: 29f1149cd07dfc2744a1088d271af65e4ad70012 + last_write_checksum: sha1:f07d54b25fddde055361c448764a428238c57a4a + pristine_git_object: 1424d87929b8c7f19205eb1a348c8278b436e817 src/mistralai/client/models/toolcallconfirmation.py: id: f2e953cfb4fe last_write_checksum: sha1:554a2e073917ffb479efe5887c0b59a2f4967c6e pristine_git_object: fd6eca50a7ec2f4cca2ae20958717881660e0ac5 src/mistralai/client/models/toolchoice.py: id: 14f7e4cc35b6 - last_write_checksum: sha1:531f7ac1d7cd7d99b79756b9c673463dd33f2011 - pristine_git_object: ce84573ae34624b1e07f7001d3a00bf36d620e5f + last_write_checksum: sha1:bf3eaf4ce3feeff3dd44e6ac69783f2833333c3e + pristine_git_object: e7a17d5cdebe8206f6df70e3be29afff68fbfe79 src/mistralai/client/models/toolchoiceenum.py: id: c7798801f860 last_write_checksum: sha1:5388b2a6fad842f8e4ae79e6257b4d14c122a6ff @@ -5357,10 +5361,6 @@ trackedFiles: id: cbe8c44aee50 last_write_checksum: sha1:53949106f192944a13a8fcbeb37b3d08478b7bbc pristine_git_object: 1a7781fc2c1001002785d512ed7909ce91a9129f - src/mistralai/client/models/tooltypes.py: - id: 86c3b54272fd - last_write_checksum: sha1:e90c15c1e645a5f207af0c7ac728cb0a521c6706 - pristine_git_object: e601c1967c42ef8d0c2eea98bc5c0ca722cde066 src/mistralai/client/models/trainingfile.py: id: 2edf9bce227d last_write_checksum: sha1:f72468d666e903a966c12273be5a64048dcd59a0 @@ -5541,10 +5541,6 @@ trackedFiles: id: 26b0903423e5 last_write_checksum: sha1:e486f50095cc7540ce828fff7571c6aa6748bf2f pristine_git_object: f82b6ec1c89cae83ea21d9bae12a1984679262ae - src/mistralai/client/models/workerinfo.py: - id: 0c231087534e - last_write_checksum: sha1:0d9e4e56c7a4c570ccf49bcdc835b33f7500629b - pristine_git_object: 65edcec61125e3276bddabf424ec289667b3b671 src/mistralai/client/models/workflow.py: id: 1548cd73984e last_write_checksum: sha1:14e1db57af8784d77633d7dc1d22198f2377909b @@ -5607,8 +5603,8 @@ trackedFiles: pristine_git_object: ffebdb82a1a80d1d086b919da9b33e2f090388c4 src/mistralai/client/models/workflowexecutionrequest.py: id: 806340497ed4 - last_write_checksum: sha1:43851e98d4c14ebdda88c5ab4412ae3a7a1d0002 - pristine_git_object: bf6a5fa0cddf979efb8ad32df77affac7f7156e8 + last_write_checksum: sha1:5270ee18d5eef0a52762ade3d207a8bbaa154f72 + pristine_git_object: 615276d30bf6131df5415a9d1d0476a0a3e16521 src/mistralai/client/models/workflowexecutionresponse.py: id: 758786637be5 last_write_checksum: sha1:2544bf94e8d64a9bd33f37ff4737f320fcd84733 @@ -5675,8 +5671,8 @@ trackedFiles: pristine_git_object: d80bb3db6cbc69404e22007a78bbef209c03c658 src/mistralai/client/models/workflowregistration.py: id: 2b937728c88b - last_write_checksum: sha1:1695e971dc6aeb546f3a35a8e47252aaa492fb1b - pristine_git_object: e23f9fb2987490d8ec3df97ec94f1190141c90c3 + last_write_checksum: sha1:aa049285311701b56fa1b3f331b395174cc9ece3 + pristine_git_object: 7c65801d28753f738dc9f0b8f06aabd4b8a50ffc src/mistralai/client/models/workflowregistrationgetresponse.py: id: f063656f22ae last_write_checksum: sha1:cc7b4d3b71ea8bb8ae452c6fd3e4acc710a18321 @@ -5687,8 +5683,8 @@ trackedFiles: pristine_git_object: e66f219b28849d7a49af7c764389e0d1d1ee7f37 src/mistralai/client/models/workflowregistrationwithworkerstatus.py: id: 23b661b9496f - last_write_checksum: sha1:a6b74946adb241437f4c2f40056a4b030ded1fc8 - pristine_git_object: c0d9a69e33992cd94755efa06df8a74406d9076f + last_write_checksum: sha1:b09da5640b53502f1d2935729b17655c176de27e + pristine_git_object: 62c379d91f6f8e0b2842b11208513635160a0c02 src/mistralai/client/models/workflowschedulelistresponse.py: id: e5247c5183bb last_write_checksum: sha1:37cea2f0f3220331105f9454169f1ea49ed1b51a @@ -5759,8 +5755,8 @@ trackedFiles: pristine_git_object: ceb8de4fe3edfbd818f6002381c365ea8437ac2c src/mistralai/client/runs.py: id: 4297d58aeb21 - last_write_checksum: sha1:a93e99bb1a5e8ba9afbe9a5dd6869c1a5f45c7b8 - pristine_git_object: 3e875ba8927d9b2e1829bbaa2ebeeb006696509e + last_write_checksum: sha1:14f158d7f30b4e072c0499d61d337aad5758c8ee + pristine_git_object: 4a468f47f70929158e937f62e3462311bb43b181 src/mistralai/client/schedules.py: id: d3b4fe452390 last_write_checksum: sha1:74a1455c5ba17253d2e878f638b7314edca66e21 @@ -5827,8 +5823,8 @@ trackedFiles: pristine_git_object: 3edad8307ea0ef38e857596a3ec11023a4af287f src/mistralai/client/utils/metadata.py: id: d49d535ae52c - last_write_checksum: sha1:54d300a665d3d5eafcc778a795d79347479b8337 - pristine_git_object: d46ffa59952926b7b1a842b0db2475527eda87df + last_write_checksum: sha1:aa5a42fb2fc9dd6469532a633648e8f1a8dad9bf + pristine_git_object: 3850a6ffb6c990a784b1692cefc81de3d67f611a src/mistralai/client/utils/queryparams.py: id: bb77d4664844 last_write_checksum: sha1:d02ce5b2dcc26edb7c937d75b98b70c22a5af189 @@ -5843,12 +5839,12 @@ trackedFiles: pristine_git_object: bea1304150e77ca06185efb7db7798aaacd5e623 src/mistralai/client/utils/security.py: id: 1acb7c006265 - last_write_checksum: sha1:3981f6571daf28b3b553beb09a4ebeeeb6ceff14 - pristine_git_object: d8b9d8fe746babd0a87846812b1f4117d1a46de2 + last_write_checksum: sha1:9f176b3d22a80f5be7f22e1879ec33a3773cf765 + pristine_git_object: 77a4449d0b54ac5c43fa150ef38ed0406c5dff66 src/mistralai/client/utils/serializers.py: id: 53c57c7f29a8 - last_write_checksum: sha1:8a3a15cf273034261111f2559cacbb579e17cb1b - pristine_git_object: fbc2772dc4284775be92de6a086c1eade9376417 + last_write_checksum: sha1:cd2d92c815492970aa7bba28346ea0e434a4169b + pristine_git_object: 691957f486c9adf667b8fbedcf04abc043f7a724 src/mistralai/client/utils/unions.py: id: d23713342634 last_write_checksum: sha1:f814d757474f039199f501aa53cdfba97a8c6645 @@ -5869,14 +5865,10 @@ trackedFiles: id: ab76b1377d79 last_write_checksum: sha1:a71af619fe7d44cb4e537b739cf3ae71d1f8da68 pristine_git_object: 2d57185746c0b2deee7c614c69a528c4a6565ee7 - src/mistralai/client/workers.py: - id: 54a46aba8359 - last_write_checksum: sha1:009ae7cbfc6ff8eb8bf29a6ccca93192ef643416 - pristine_git_object: e2d41c70ecaeec1439ff9398b79de2af7eca54f1 src/mistralai/client/workflows.py: id: e2a0381191f6 - last_write_checksum: sha1:df0555b350409d103ca9715c69fab2e061d7ea41 - pristine_git_object: aae12f774608d18baf1bf5ccedd1a39363c0c29d + last_write_checksum: sha1:c167220912b40afa6a570f26612a02a5178ae842 + pristine_git_object: 83917a9500339c77566657d24d2d1865f612c326 src/mistralai/client/workflows_events.py: id: 6d4f674ce8ef last_write_checksum: sha1:ee029cad739604429d7cff743f2a469cd3cd4076 @@ -7994,7 +7986,7 @@ examples: include_shared: true responses: "200": - application/json: {"workflow_registration": {"id": "db19a749-c9a8-4fc8-a04b-540b6b648c8f", "task_queue": "", "definition": {"input_schema": {"key": ""}, "enforce_determinism": false}, "workflow_id": "78b8c35a-8488-497f-80f4-8fef6fbbd4ad", "compatible_with_chat_assistant": false, "active": false}, "workflow_version": {"id": "e35a35c7-8a69-4bf2-a597-e2b0916c4c5e", "task_queue": "", "definition": {"input_schema": {"key": ""}, "enforce_determinism": false}, "workflow_id": "2238d5fa-45be-48d4-9705-a1852ab34b83", "compatible_with_chat_assistant": false, "active": false}} + application/json: {"workflow_registration": {"id": "db19a749-c9a8-4fc8-a04b-540b6b648c8f", "definition": {"input_schema": {"key": ""}, "enforce_determinism": false}, "workflow_id": "78b8c35a-8488-497f-80f4-8fef6fbbd4ad", "compatible_with_chat_assistant": false, "active": false}, "workflow_version": {"id": "e35a35c7-8a69-4bf2-a597-e2b0916c4c5e", "definition": {"input_schema": {"key": ""}, "enforce_determinism": false}, "workflow_id": "2238d5fa-45be-48d4-9705-a1852ab34b83", "compatible_with_chat_assistant": false, "active": false}} "422": application/json: {} archive_workflow_v1_workflows__workflow_identifier__archive_put: @@ -8295,6 +8287,7 @@ examples: application/json: {"scheduler_url": "https://closed-passport.info/", "namespace": "", "tls": false} examplesVersion: 1.0.2 generatedTests: {} +releaseNotes: "## Python SDK Changes:\n* `mistral.models.list()`: `response.data[].union(fine-tuned).job` **Changed** (Breaking ⚠️)\n* `mistral.models.retrieve()`: `response.union(fine-tuned).job` **Changed** (Breaking ⚠️)\n* `mistral.chat.complete()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.choices[].message.tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.chat.stream()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.[].data.choices[].delta.tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.fim.complete()`: `response.choices[].message.tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.fim.stream()`: `response.[].data.choices[].delta.tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.workflows.get_workflow_registration()`: `response.workflow_registration` **Changed** (Breaking ⚠️)\n* `mistral.workflows.execute_workflow_registration()`: `request.input` **Changed** (Breaking ⚠️)\n* `mistral.workflows.execute_workflow()`: `request.input` **Changed** (Breaking ⚠️)\n* `mistral.workflows.get_workflow_registrations()`: `response.workflow_registrations[]` **Changed** (Breaking ⚠️)\n* `mistral.classifiers.classify_chat()`: \n * `request.input.union(Array)[].messages[].union(assistant).tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.classifiers.moderate_chat()`: \n * `request.inputs.union(Array<>)[].union(assistant).tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.agents.stream()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.[].data.choices[].delta.tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.agents.complete()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.choices[].message.tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.beta.observability.datasets.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_explorer()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.fetch()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.update()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.judge_conversation()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.campaigns.create()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.campaigns.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.campaigns.fetch()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.campaigns.delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.campaigns.fetch_status()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.campaigns.list_events()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.create()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.fields.fetch_option_counts()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.fetch()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.update()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.list_records()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.create_record()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_campaign()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.create()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_file()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_playground()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_dataset_records()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.export_to_jsonl()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.fetch_task()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.list_tasks()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.fetch()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.fields.fetch_options()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.fields.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.judge()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.fetch_similar_events()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.fetch()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.search_ids()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.search()`: `error.detail.error_code` **Changed**\n* `mistral.workflows.workers.whoami()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.observability.datasets.records.bulk_delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.judge()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.update_payload()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.update_properties()`: `error.detail.error_code` **Changed**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 0c50d415..a408c9c4 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.2.0 + version: 2.2.1 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index fff0c8c6..ce290925 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.754.0 +speakeasyVersion: 1.761.1 sources: mistral-azure-source: sourceNamespace: mistral-openapi-azure @@ -16,8 +16,8 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:8a9e51d8532d887897d3335b416422973f6d1adb687a88dc288bfb51e1fdacdf - sourceBlobDigest: sha256:ad19d950e5564f613ce71b9b0b98eadf76609f0ff96db0e083b20c8190c718e3 + sourceRevisionDigest: sha256:d8f601bfc7b859bb260b49b80a6359db51002b0e2ca15d65fab4459c3b4ee647 + sourceBlobDigest: sha256:9e26b68380c1e470617007c7e01020e6d9db661803440c8a0a46f21f155d86a0 tags: - latest targets: @@ -38,13 +38,13 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:8a9e51d8532d887897d3335b416422973f6d1adb687a88dc288bfb51e1fdacdf - sourceBlobDigest: sha256:ad19d950e5564f613ce71b9b0b98eadf76609f0ff96db0e083b20c8190c718e3 + sourceRevisionDigest: sha256:d8f601bfc7b859bb260b49b80a6359db51002b0e2ca15d65fab4459c3b4ee647 + sourceBlobDigest: sha256:9e26b68380c1e470617007c7e01020e6d9db661803440c8a0a46f21f155d86a0 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:87ec31b36ce736c3f60cce2c11b8192bb5617b5ce9d881aadc0cf4a86563173c + codeSamplesRevisionDigest: sha256:11e9928b89f856d16bd543b0eaa760ce88344fce7366df646847b9f3533bc4c7 workflow: workflowVersion: 1.0.0 - speakeasyVersion: 1.754.0 + speakeasyVersion: 1.761.1 sources: mistral-azure-source: inputs: diff --git a/README-PYPI.md b/README-PYPI.md index 8c97f93c..703095e4 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -730,10 +730,6 @@ print(res.choices[0].message.content) * [schedule_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#schedule_workflow) - Schedule Workflow * [unschedule_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#unschedule_workflow) - Unschedule Workflow -#### [Workflows.Workers](https://github.com/mistralai/client-python/blob/main/docs/sdks/workers/README.md) - -* [whoami](https://github.com/mistralai/client-python/blob/main/docs/sdks/workers/README.md#whoami) - Get Worker Info - @@ -944,8 +940,8 @@ with Mistral( **Inherit from [`MistralError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 103 of 169 methods.* -* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 169 methods.* +* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 103 of 168 methods.* +* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 168 methods.* * [`ResponseValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute. diff --git a/README.md b/README.md index 156f344f..941ac903 100644 --- a/README.md +++ b/README.md @@ -730,10 +730,6 @@ print(res.choices[0].message.content) * [schedule_workflow](docs/sdks/schedules/README.md#schedule_workflow) - Schedule Workflow * [unschedule_workflow](docs/sdks/schedules/README.md#unschedule_workflow) - Unschedule Workflow -#### [Workflows.Workers](docs/sdks/workers/README.md) - -* [whoami](docs/sdks/workers/README.md#whoami) - Get Worker Info - @@ -944,8 +940,8 @@ with Mistral( **Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 103 of 169 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 169 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 103 of 168 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 168 methods.* * [`ResponseValidationError`](./src/mistralai/client/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute. diff --git a/RELEASES.md b/RELEASES.md index 852ddced..20576007 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -528,4 +528,14 @@ Based on: ### Generated - [python v2.2.0] . ### Releases -- [PyPI v2.2.0] https://pypi.org/project/mistralai/2.2.0 - . \ No newline at end of file +- [PyPI v2.2.0] https://pypi.org/project/mistralai/2.2.0 - . + +## 2026-04-03 10:23:19 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.1 (2.879.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.2.1] . +### Releases +- [PyPI v2.2.1] https://pypi.org/project/mistralai/2.2.1 - . \ No newline at end of file diff --git a/docs/models/agentscompletionrequest.md b/docs/models/agentscompletionrequest.md index 99f47f5c..8627e359 100644 --- a/docs/models/agentscompletionrequest.md +++ b/docs/models/agentscompletionrequest.md @@ -12,7 +12,7 @@ | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.AgentsCompletionRequestMessage](../models/agentscompletionrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | N/A | | +| `tools` | List[[models.AgentsCompletionRequestTool](../models/agentscompletionrequesttool.md)] | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionRequestToolChoice]](../models/agentscompletionrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | diff --git a/docs/models/agentscompletionrequesttool.md b/docs/models/agentscompletionrequesttool.md new file mode 100644 index 00000000..c2035866 --- /dev/null +++ b/docs/models/agentscompletionrequesttool.md @@ -0,0 +1,47 @@ +# AgentsCompletionRequestTool + + +## Supported Types + +### `models.Tool` + +```python +value: models.Tool = /* values here */ +``` + +### `models.WebSearchTool` + +```python +value: models.WebSearchTool = /* values here */ +``` + +### `models.WebSearchPremiumTool` + +```python +value: models.WebSearchPremiumTool = /* values here */ +``` + +### `models.CodeInterpreterTool` + +```python +value: models.CodeInterpreterTool = /* values here */ +``` + +### `models.ImageGenerationTool` + +```python +value: models.ImageGenerationTool = /* values here */ +``` + +### `models.DocumentLibraryTool` + +```python +value: models.DocumentLibraryTool = /* values here */ +``` + +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + diff --git a/docs/models/agentscompletionstreamrequest.md b/docs/models/agentscompletionstreamrequest.md index d5455230..3845f08c 100644 --- a/docs/models/agentscompletionstreamrequest.md +++ b/docs/models/agentscompletionstreamrequest.md @@ -12,7 +12,7 @@ | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.AgentsCompletionStreamRequestMessage](../models/agentscompletionstreamrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | N/A | | +| `tools` | List[[models.AgentsCompletionStreamRequestTool](../models/agentscompletionstreamrequesttool.md)] | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionStreamRequestToolChoice]](../models/agentscompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | diff --git a/docs/models/agentscompletionstreamrequesttool.md b/docs/models/agentscompletionstreamrequesttool.md new file mode 100644 index 00000000..6a11b042 --- /dev/null +++ b/docs/models/agentscompletionstreamrequesttool.md @@ -0,0 +1,47 @@ +# AgentsCompletionStreamRequestTool + + +## Supported Types + +### `models.Tool` + +```python +value: models.Tool = /* values here */ +``` + +### `models.WebSearchTool` + +```python +value: models.WebSearchTool = /* values here */ +``` + +### `models.WebSearchPremiumTool` + +```python +value: models.WebSearchPremiumTool = /* values here */ +``` + +### `models.CodeInterpreterTool` + +```python +value: models.CodeInterpreterTool = /* values here */ +``` + +### `models.ImageGenerationTool` + +```python +value: models.ImageGenerationTool = /* values here */ +``` + +### `models.DocumentLibraryTool` + +```python +value: models.DocumentLibraryTool = /* values here */ +``` + +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + diff --git a/docs/models/chatcompletionrequest.md b/docs/models/chatcompletionrequest.md index 4e29ad05..042988e6 100644 --- a/docs/models/chatcompletionrequest.md +++ b/docs/models/chatcompletionrequest.md @@ -15,7 +15,7 @@ | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.ChatCompletionRequestMessage](../models/chatcompletionrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | List[[models.ChatCompletionRequestTool](../models/chatcompletionrequesttool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionRequestToolChoice]](../models/chatcompletionrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | diff --git a/docs/models/chatcompletionrequesttool.md b/docs/models/chatcompletionrequesttool.md new file mode 100644 index 00000000..572d12ca --- /dev/null +++ b/docs/models/chatcompletionrequesttool.md @@ -0,0 +1,47 @@ +# ChatCompletionRequestTool + + +## Supported Types + +### `models.Tool` + +```python +value: models.Tool = /* values here */ +``` + +### `models.WebSearchTool` + +```python +value: models.WebSearchTool = /* values here */ +``` + +### `models.WebSearchPremiumTool` + +```python +value: models.WebSearchPremiumTool = /* values here */ +``` + +### `models.CodeInterpreterTool` + +```python +value: models.CodeInterpreterTool = /* values here */ +``` + +### `models.ImageGenerationTool` + +```python +value: models.ImageGenerationTool = /* values here */ +``` + +### `models.DocumentLibraryTool` + +```python +value: models.DocumentLibraryTool = /* values here */ +``` + +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + diff --git a/docs/models/chatcompletionstreamrequest.md b/docs/models/chatcompletionstreamrequest.md index 7ece3742..9783d010 100644 --- a/docs/models/chatcompletionstreamrequest.md +++ b/docs/models/chatcompletionstreamrequest.md @@ -15,7 +15,7 @@ | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.ChatCompletionStreamRequestMessage](../models/chatcompletionstreamrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | List[[models.ChatCompletionStreamRequestTool](../models/chatcompletionstreamrequesttool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionStreamRequestToolChoice]](../models/chatcompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | diff --git a/docs/models/chatcompletionstreamrequesttool.md b/docs/models/chatcompletionstreamrequesttool.md new file mode 100644 index 00000000..48998fcb --- /dev/null +++ b/docs/models/chatcompletionstreamrequesttool.md @@ -0,0 +1,47 @@ +# ChatCompletionStreamRequestTool + + +## Supported Types + +### `models.Tool` + +```python +value: models.Tool = /* values here */ +``` + +### `models.WebSearchTool` + +```python +value: models.WebSearchTool = /* values here */ +``` + +### `models.WebSearchPremiumTool` + +```python +value: models.WebSearchPremiumTool = /* values here */ +``` + +### `models.CodeInterpreterTool` + +```python +value: models.CodeInterpreterTool = /* values here */ +``` + +### `models.ImageGenerationTool` + +```python +value: models.ImageGenerationTool = /* values here */ +``` + +### `models.DocumentLibraryTool` + +```python +value: models.DocumentLibraryTool = /* values here */ +``` + +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + diff --git a/docs/models/filesapiroutesgetsignedurlrequest.md b/docs/models/filesapiroutesgetsignedurlrequest.md index dbe3c801..794f25f7 100644 --- a/docs/models/filesapiroutesgetsignedurlrequest.md +++ b/docs/models/filesapiroutesgetsignedurlrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `file_id` | *str* | :heavy_check_mark: | N/A | -| `expiry` | *Optional[int]* | :heavy_minus_sign: | Number of hours before the url becomes invalid. Defaults to 24h | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `file_id` | *str* | :heavy_check_mark: | N/A | +| `expiry` | *Optional[int]* | :heavy_minus_sign: | Number of hours before the URL becomes invalid. Defaults to 24h. Must be between 1h and 168h. | \ No newline at end of file diff --git a/docs/models/ftmodelcard.md b/docs/models/ftmodelcard.md index 0381dd81..f65ff6e8 100644 --- a/docs/models/ftmodelcard.md +++ b/docs/models/ftmodelcard.md @@ -20,6 +20,6 @@ Extra fields for fine-tuned models. | `deprecation_replacement_model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `default_model_temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | `type` | *Literal["fine-tuned"]* | :heavy_check_mark: | N/A | -| `job` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `job` | *str* | :heavy_check_mark: | N/A | | `root` | *str* | :heavy_check_mark: | N/A | | `archived` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/library.md b/docs/models/library.md index 4319f43d..a07d3afa 100644 --- a/docs/models/library.md +++ b/docs/models/library.md @@ -3,21 +3,21 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | -| `name` | *str* | :heavy_check_mark: | N/A | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `owner_id` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `owner_type` | *str* | :heavy_check_mark: | N/A | -| `total_size` | *int* | :heavy_check_mark: | N/A | -| `nb_documents` | *int* | :heavy_check_mark: | N/A | -| `chunk_size` | *Nullable[int]* | :heavy_check_mark: | N/A | -| `emoji` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `generated_description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `explicit_user_members_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `explicit_workspace_members_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `org_sharing_role` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `generated_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Generated Name | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `owner_id` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `owner_type` | *str* | :heavy_check_mark: | N/A | +| `total_size` | *int* | :heavy_check_mark: | N/A | +| `nb_documents` | *int* | :heavy_check_mark: | N/A | +| `chunk_size` | *Nullable[int]* | :heavy_check_mark: | N/A | +| `emoji` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `generated_description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `explicit_user_members_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `explicit_workspace_members_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| ~~`org_sharing_role`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `generated_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Generated Name | \ No newline at end of file diff --git a/docs/models/observabilityerrorcode.md b/docs/models/observabilityerrorcode.md index d121b264..c2afc4d0 100644 --- a/docs/models/observabilityerrorcode.md +++ b/docs/models/observabilityerrorcode.md @@ -56,4 +56,7 @@ This is an open enum. Unrecognized values will not fail type checks. - `"EVALUATION_RUN_TRANSITION_IS_INVALID"` - `"EVALUATION_RUN_TRANSITION_IS_RUNNING_ALREADY"` - `"EVALUATION_RUN_TRANSITION_ERROR"` +- `"TEMPLATE_ERROR"` - `"TEMPLATE_SYNTAX_ERROR"` +- `"PROJECT_NAME_ALREADY_EXISTS"` +- `"EVALUATION_NAME_ALREADY_EXISTS"` diff --git a/docs/models/tool.md b/docs/models/tool.md index fb661f72..85888d01 100644 --- a/docs/models/tool.md +++ b/docs/models/tool.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `type` | [Optional[models.ToolTypes]](../models/tooltypes.md) | :heavy_minus_sign: | N/A | -| `function` | [models.Function](../models/function.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `type` | *Union[Literal["function"], UnrecognizedStr]* | :heavy_check_mark: | N/A | +| `function` | [models.Function](../models/function.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/toolcall.md b/docs/models/toolcall.md index 3819236b..9d236e8b 100644 --- a/docs/models/toolcall.md +++ b/docs/models/toolcall.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `type` | [Optional[models.ToolTypes]](../models/tooltypes.md) | :heavy_minus_sign: | N/A | -| `function` | [models.FunctionCall](../models/functioncall.md) | :heavy_check_mark: | N/A | -| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `function` | [models.FunctionCall](../models/functioncall.md) | :heavy_check_mark: | N/A | +| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/toolchoice.md b/docs/models/toolchoice.md index 373046bb..a457f96f 100644 --- a/docs/models/toolchoice.md +++ b/docs/models/toolchoice.md @@ -7,5 +7,5 @@ ToolChoice is either a ToolChoiceEnum or a ToolChoice | Field | Type | Required | Description | | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `type` | [Optional[models.ToolTypes]](../models/tooltypes.md) | :heavy_minus_sign: | N/A | +| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | | `function` | [models.FunctionName](../models/functionname.md) | :heavy_check_mark: | this restriction of `Function` is used to select a specific function to call | \ No newline at end of file diff --git a/docs/models/tooltypes.md b/docs/models/tooltypes.md deleted file mode 100644 index 345ee7dc..00000000 --- a/docs/models/tooltypes.md +++ /dev/null @@ -1,17 +0,0 @@ -# ToolTypes - -## Example Usage - -```python -from mistralai.client.models import ToolTypes - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: ToolTypes = "function" -``` - - -## Values - -This is an open enum. Unrecognized values will not fail type checks. - -- `"function"` diff --git a/docs/models/workerinfo.md b/docs/models/workerinfo.md deleted file mode 100644 index 997f62ab..00000000 --- a/docs/models/workerinfo.md +++ /dev/null @@ -1,10 +0,0 @@ -# WorkerInfo - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `scheduler_url` | *str* | :heavy_check_mark: | N/A | -| `namespace` | *str* | :heavy_check_mark: | N/A | -| `tls` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/workflowexecutionrequest.md b/docs/models/workflowexecutionrequest.md index 553119b1..54f61ea3 100644 --- a/docs/models/workflowexecutionrequest.md +++ b/docs/models/workflowexecutionrequest.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Allows you to specify a custom execution ID. If not provided, a random ID will be generated. | -| `input` | Dict[str, *Any*] | :heavy_minus_sign: | The input to the workflow. This should be a dictionary that matches the workflow's input schema. | +| `input` | *OptionalNullable[Any]* | :heavy_minus_sign: | The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. | | `encoded_input` | [OptionalNullable[models.NetworkEncodedInput]](../models/networkencodedinput.md) | :heavy_minus_sign: | Encoded input to the workflow, used when payload encoding is enabled. | | `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | | `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | diff --git a/docs/models/workflowregistration.md b/docs/models/workflowregistration.md index aad6831a..52658c64 100644 --- a/docs/models/workflowregistration.md +++ b/docs/models/workflowregistration.md @@ -3,11 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Unique identifier of the workflow registration | -| `task_queue` | *str* | :heavy_check_mark: | Project name of the workflow | -| `definition` | [models.WorkflowCodeDefinition](../models/workflowcodedefinition.md) | :heavy_check_mark: | N/A | -| `workflow_id` | *str* | :heavy_check_mark: | Workflow ID of the workflow | -| `workflow` | [OptionalNullable[models.Workflow]](../models/workflow.md) | :heavy_minus_sign: | Workflow of the workflow registration | -| `compatible_with_chat_assistant` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is compatible with chat assistant | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Unique identifier of the workflow registration | +| `deployment_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Deployment ID this registration belongs to | +| ~~`task_queue`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use deployment_id instead. Will be removed in a future release. | +| `definition` | [models.WorkflowCodeDefinition](../models/workflowcodedefinition.md) | :heavy_check_mark: | N/A | +| `workflow_id` | *str* | :heavy_check_mark: | Workflow ID of the workflow | +| `workflow` | [OptionalNullable[models.Workflow]](../models/workflow.md) | :heavy_minus_sign: | Workflow of the workflow registration | +| `compatible_with_chat_assistant` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is compatible with chat assistant | \ No newline at end of file diff --git a/docs/models/workflowregistrationwithworkerstatus.md b/docs/models/workflowregistrationwithworkerstatus.md index 625871c1..f85563ce 100644 --- a/docs/models/workflowregistrationwithworkerstatus.md +++ b/docs/models/workflowregistrationwithworkerstatus.md @@ -3,12 +3,13 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Unique identifier of the workflow registration | -| `task_queue` | *str* | :heavy_check_mark: | Project name of the workflow | -| `definition` | [models.WorkflowCodeDefinition](../models/workflowcodedefinition.md) | :heavy_check_mark: | N/A | -| `workflow_id` | *str* | :heavy_check_mark: | Workflow ID of the workflow | -| `workflow` | [OptionalNullable[models.Workflow]](../models/workflow.md) | :heavy_minus_sign: | Workflow of the workflow registration | -| `compatible_with_chat_assistant` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is compatible with chat assistant | -| `active` | *bool* | :heavy_check_mark: | Whether the workflow registration is active | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Unique identifier of the workflow registration | +| `deployment_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Deployment ID this registration belongs to | +| ~~`task_queue`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use deployment_id instead. Will be removed in a future release. | +| `definition` | [models.WorkflowCodeDefinition](../models/workflowcodedefinition.md) | :heavy_check_mark: | N/A | +| `workflow_id` | *str* | :heavy_check_mark: | Workflow ID of the workflow | +| `workflow` | [OptionalNullable[models.Workflow]](../models/workflow.md) | :heavy_minus_sign: | Workflow of the workflow registration | +| `compatible_with_chat_assistant` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is compatible with chat assistant | +| `active` | *bool* | :heavy_check_mark: | Whether the workflow registration is active | \ No newline at end of file diff --git a/docs/sdks/agents/README.md b/docs/sdks/agents/README.md index b1b80bdf..db15db81 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -51,7 +51,7 @@ with Mistral( | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../../models/tool.md)] | :heavy_minus_sign: | N/A | | +| `tools` | List[[models.AgentsCompletionRequestTool](../../models/agentscompletionrequesttool.md)] | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionRequestToolChoice]](../../models/agentscompletionrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -118,7 +118,7 @@ with Mistral( | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../../models/tool.md)] | :heavy_minus_sign: | N/A | | +| `tools` | List[[models.AgentsCompletionStreamRequestTool](../../models/agentscompletionstreamrequesttool.md)] | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionStreamRequestToolChoice]](../../models/agentscompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md index afbbeae4..2e5aaaf7 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -53,7 +53,7 @@ with Mistral( | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | List[[models.ChatCompletionRequestTool](../../models/chatcompletionrequesttool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionRequestToolChoice]](../../models/chatcompletionrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -123,7 +123,7 @@ with Mistral( | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | List[[models.ChatCompletionStreamRequestTool](../../models/chatcompletionstreamrequesttool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionStreamRequestToolChoice]](../../models/chatcompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | diff --git a/docs/sdks/files/README.md b/docs/sdks/files/README.md index bceebdf8..d0e88f2e 100644 --- a/docs/sdks/files/README.md +++ b/docs/sdks/files/README.md @@ -255,11 +255,11 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `file_id` | *str* | :heavy_check_mark: | N/A | -| `expiry` | *Optional[int]* | :heavy_minus_sign: | Number of hours before the url becomes invalid. Defaults to 24h | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `file_id` | *str* | :heavy_check_mark: | N/A | +| `expiry` | *Optional[int]* | :heavy_minus_sign: | Number of hours before the URL becomes invalid. Defaults to 24h. Must be between 1h and 168h. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/workers/README.md b/docs/sdks/workers/README.md deleted file mode 100644 index 5e2380d1..00000000 --- a/docs/sdks/workers/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Workflows.Workers - -## Overview - -### Available Operations - -* [whoami](#whoami) - Get Worker Info - -## whoami - -Get Worker Info - -### Example Usage - - -```python -from mistralai.client import Mistral -import os - - -with Mistral( - api_key=os.getenv("MISTRAL_API_KEY", ""), -) as mistral: - - res = mistral.workflows.workers.whoami() - - # Handle response - print(res) - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - -### Response - -**[models.WorkerInfo](../../models/workerinfo.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/workflows/README.md b/docs/sdks/workflows/README.md index e65383ca..324c46b1 100644 --- a/docs/sdks/workflows/README.md +++ b/docs/sdks/workflows/README.md @@ -141,7 +141,7 @@ with Mistral( | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `workflow_identifier` | *str* | :heavy_check_mark: | N/A | | `execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Allows you to specify a custom execution ID. If not provided, a random ID will be generated. | -| `input` | Dict[str, *Any*] | :heavy_minus_sign: | The input to the workflow. This should be a dictionary that matches the workflow's input schema. | +| `input` | *OptionalNullable[Any]* | :heavy_minus_sign: | The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. | | `encoded_input` | [OptionalNullable[models.NetworkEncodedInput]](../../models/networkencodedinput.md) | :heavy_minus_sign: | Encoded input to the workflow, used when payload encoding is enabled. | | `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | | `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | @@ -192,7 +192,7 @@ with Mistral( | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `workflow_registration_id` | *str* | :heavy_check_mark: | N/A | | `execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Allows you to specify a custom execution ID. If not provided, a random ID will be generated. | -| `input` | Dict[str, *Any*] | :heavy_minus_sign: | The input to the workflow. This should be a dictionary that matches the workflow's input schema. | +| `input` | *OptionalNullable[Any]* | :heavy_minus_sign: | The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. | | `encoded_input` | [OptionalNullable[models.NetworkEncodedInput]](../../models/networkencodedinput.md) | :heavy_minus_sign: | Encoded input to the workflow, used when payload encoding is enabled. | | `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | | `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 0473419e..a8c34e6d 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.2.0" +__version__: str = "2.2.1" __openapi_doc_version__: str = "1.0.0" -__gen_version__: str = "2.862.0" -__user_agent__: str = "speakeasy-sdk/python 2.2.0 2.862.0 1.0.0 mistralai" +__gen_version__: str = "2.879.6" +__user_agent__: str = "speakeasy-sdk/python 2.2.1 2.879.6 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/agents.py b/src/mistralai/client/agents.py index 2e91dd04..f3bd706e 100644 --- a/src/mistralai/client/agents.py +++ b/src/mistralai/client/agents.py @@ -35,7 +35,10 @@ def complete( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.AgentsCompletionRequestTool], + List[models.AgentsCompletionRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -107,7 +110,9 @@ def complete( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.AgentsCompletionRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.AgentsCompletionRequestToolChoice] ), @@ -208,7 +213,10 @@ async def complete_async( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.AgentsCompletionRequestTool], + List[models.AgentsCompletionRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -280,7 +288,9 @@ async def complete_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.AgentsCompletionRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.AgentsCompletionRequestToolChoice] ), @@ -381,7 +391,10 @@ def stream( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.AgentsCompletionStreamRequestTool], + List[models.AgentsCompletionStreamRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -455,7 +468,9 @@ def stream( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.AgentsCompletionStreamRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.AgentsCompletionStreamRequestToolChoice] ), @@ -564,7 +579,10 @@ async def stream_async( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.AgentsCompletionStreamRequestTool], + List[models.AgentsCompletionStreamRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -638,7 +656,9 @@ async def stream_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.AgentsCompletionStreamRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.AgentsCompletionStreamRequestToolChoice] ), diff --git a/src/mistralai/client/basesdk.py b/src/mistralai/client/basesdk.py index a976121b..4a27eb2f 100644 --- a/src/mistralai/client/basesdk.py +++ b/src/mistralai/client/basesdk.py @@ -67,6 +67,7 @@ def _build_request_async( url_override: Optional[str] = None, http_headers: Optional[Mapping[str, str]] = None, allow_empty_value: Optional[List[str]] = None, + allowed_fields: Optional[List[str]] = None, ) -> httpx.Request: client = self.sdk_configuration.async_client return self._build_request_with_client( @@ -88,6 +89,7 @@ def _build_request_async( url_override, http_headers, allow_empty_value, + allowed_fields, ) def _build_request( @@ -111,6 +113,7 @@ def _build_request( url_override: Optional[str] = None, http_headers: Optional[Mapping[str, str]] = None, allow_empty_value: Optional[List[str]] = None, + allowed_fields: Optional[List[str]] = None, ) -> httpx.Request: client = self.sdk_configuration.client return self._build_request_with_client( @@ -132,6 +135,7 @@ def _build_request( url_override, http_headers, allow_empty_value, + allowed_fields, ) def _build_request_with_client( @@ -156,6 +160,7 @@ def _build_request_with_client( url_override: Optional[str] = None, http_headers: Optional[Mapping[str, str]] = None, allow_empty_value: Optional[List[str]] = None, + allowed_fields: Optional[List[str]] = None, ) -> httpx.Request: query_params = {} @@ -189,7 +194,9 @@ def _build_request_with_client( security = security() security = utils.get_security_from_env(security, models.Security) if security is not None: - security_headers, security_query_params = utils.get_security(security) + security_headers, security_query_params = utils.get_security( + security, allowed_fields + ) headers = {**headers, **security_headers} query_params = {**query_params, **security_query_params} @@ -226,7 +233,7 @@ def _build_request_with_client( data=serialized_request_body.data, files=serialized_request_body.files, headers=headers, - timeout=timeout, + timeout=timeout if timeout is not None else httpx.USE_CLIENT_DEFAULT, ) def do_request( @@ -246,6 +253,8 @@ def do(): http_res = None try: req = hooks.before_request(BeforeRequestContext(hook_ctx), request) + if "timeout" in request.extensions and "timeout" not in req.extensions: + req.extensions["timeout"] = request.extensions["timeout"] logger.debug( "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", req.method, @@ -321,6 +330,8 @@ async def do(): hooks.before_request, BeforeRequestContext(hook_ctx), request ) + if "timeout" in request.extensions and "timeout" not in req.extensions: + req.extensions["timeout"] = request.extensions["timeout"] logger.debug( "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", req.method, diff --git a/src/mistralai/client/chat.py b/src/mistralai/client/chat.py index c11a53d1..78968fcf 100644 --- a/src/mistralai/client/chat.py +++ b/src/mistralai/client/chat.py @@ -122,7 +122,10 @@ def complete( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.ChatCompletionRequestTool], + List[models.ChatCompletionRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -201,7 +204,9 @@ def complete( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.ChatCompletionRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionRequestToolChoice] ), @@ -304,7 +309,10 @@ async def complete_async( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.ChatCompletionRequestTool], + List[models.ChatCompletionRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -383,7 +391,9 @@ async def complete_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.ChatCompletionRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionRequestToolChoice] ), @@ -486,7 +496,10 @@ def stream( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.ChatCompletionStreamRequestTool], + List[models.ChatCompletionStreamRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -567,7 +580,9 @@ def stream( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.ChatCompletionStreamRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionStreamRequestToolChoice] ), @@ -678,7 +693,10 @@ async def stream_async( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.ChatCompletionStreamRequestTool], + List[models.ChatCompletionStreamRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -759,7 +777,9 @@ async def stream_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.ChatCompletionStreamRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionStreamRequestToolChoice] ), diff --git a/src/mistralai/client/files.py b/src/mistralai/client/files.py index a843cb7b..453c97c7 100644 --- a/src/mistralai/client/files.py +++ b/src/mistralai/client/files.py @@ -965,7 +965,7 @@ def get_signed_url( r"""Get Signed Url :param file_id: - :param expiry: Number of hours before the url becomes invalid. Defaults to 24h + :param expiry: Number of hours before the URL becomes invalid. Defaults to 24h. Must be between 1h and 168h. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1050,7 +1050,7 @@ async def get_signed_url_async( r"""Get Signed Url :param file_id: - :param expiry: Number of hours before the url becomes invalid. Defaults to 24h + :param expiry: Number of hours before the URL becomes invalid. Defaults to 24h. Must be between 1h and 168h. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 6c15ed3a..5e03fddf 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -157,8 +157,10 @@ AgentsCompletionRequestMessageTypedDict, AgentsCompletionRequestStop, AgentsCompletionRequestStopTypedDict, + AgentsCompletionRequestTool, AgentsCompletionRequestToolChoice, AgentsCompletionRequestToolChoiceTypedDict, + AgentsCompletionRequestToolTypedDict, AgentsCompletionRequestTypedDict, ) from .agentscompletionstreamrequest import ( @@ -167,8 +169,10 @@ AgentsCompletionStreamRequestMessageTypedDict, AgentsCompletionStreamRequestStop, AgentsCompletionStreamRequestStopTypedDict, + AgentsCompletionStreamRequestTool, AgentsCompletionStreamRequestToolChoice, AgentsCompletionStreamRequestToolChoiceTypedDict, + AgentsCompletionStreamRequestToolTypedDict, AgentsCompletionStreamRequestTypedDict, ) from .annotations import Annotations, AnnotationsTypedDict, Audience @@ -260,8 +264,10 @@ ChatCompletionRequestMessageTypedDict, ChatCompletionRequestStop, ChatCompletionRequestStopTypedDict, + ChatCompletionRequestTool, ChatCompletionRequestToolChoice, ChatCompletionRequestToolChoiceTypedDict, + ChatCompletionRequestToolTypedDict, ChatCompletionRequestTypedDict, ) from .chatcompletionresponse import ( @@ -274,8 +280,10 @@ ChatCompletionStreamRequestMessageTypedDict, ChatCompletionStreamRequestStop, ChatCompletionStreamRequestStopTypedDict, + ChatCompletionStreamRequestTool, ChatCompletionStreamRequestToolChoice, ChatCompletionStreamRequestToolChoiceTypedDict, + ChatCompletionStreamRequestToolTypedDict, ChatCompletionStreamRequestTypedDict, ) from .chatmoderationrequest import ( @@ -1738,7 +1746,6 @@ ToolReferenceChunkTypedDict, ) from .tooltype import ToolType - from .tooltypes import ToolTypes from .trainingfile import TrainingFile, TrainingFileTypedDict from .transcriptionresponse import ( TranscriptionResponse, @@ -1894,7 +1901,6 @@ WebSearchPremiumToolTypedDict, ) from .websearchtool import WebSearchTool, WebSearchToolTypedDict - from .workerinfo import WorkerInfo, WorkerInfoTypedDict from .workflow import Workflow, WorkflowTypedDict from .workflowarchiveresponse import ( WorkflowArchiveResponse, @@ -2154,16 +2160,20 @@ "AgentsCompletionRequestMessageTypedDict", "AgentsCompletionRequestStop", "AgentsCompletionRequestStopTypedDict", + "AgentsCompletionRequestTool", "AgentsCompletionRequestToolChoice", "AgentsCompletionRequestToolChoiceTypedDict", + "AgentsCompletionRequestToolTypedDict", "AgentsCompletionRequestTypedDict", "AgentsCompletionStreamRequest", "AgentsCompletionStreamRequestMessage", "AgentsCompletionStreamRequestMessageTypedDict", "AgentsCompletionStreamRequestStop", "AgentsCompletionStreamRequestStopTypedDict", + "AgentsCompletionStreamRequestTool", "AgentsCompletionStreamRequestToolChoice", "AgentsCompletionStreamRequestToolChoiceTypedDict", + "AgentsCompletionStreamRequestToolTypedDict", "AgentsCompletionStreamRequestTypedDict", "And", "AndTypedDict", @@ -2245,8 +2255,10 @@ "ChatCompletionRequestMessageTypedDict", "ChatCompletionRequestStop", "ChatCompletionRequestStopTypedDict", + "ChatCompletionRequestTool", "ChatCompletionRequestToolChoice", "ChatCompletionRequestToolChoiceTypedDict", + "ChatCompletionRequestToolTypedDict", "ChatCompletionRequestTypedDict", "ChatCompletionResponse", "ChatCompletionResponseTypedDict", @@ -2255,8 +2267,10 @@ "ChatCompletionStreamRequestMessageTypedDict", "ChatCompletionStreamRequestStop", "ChatCompletionStreamRequestStopTypedDict", + "ChatCompletionStreamRequestTool", "ChatCompletionStreamRequestToolChoice", "ChatCompletionStreamRequestToolChoiceTypedDict", + "ChatCompletionStreamRequestToolTypedDict", "ChatCompletionStreamRequestTypedDict", "ChatModerationRequest", "ChatModerationRequestInputs1", @@ -3284,7 +3298,6 @@ "ToolReferenceChunkTypedDict", "ToolType", "ToolTypedDict", - "ToolTypes", "TrainingFile", "TrainingFileTypedDict", "TranscriptionResponse", @@ -3410,8 +3423,6 @@ "WebSearchPremiumToolTypedDict", "WebSearchTool", "WebSearchToolTypedDict", - "WorkerInfo", - "WorkerInfoTypedDict", "Workflow", "WorkflowArchiveResponse", "WorkflowArchiveResponseTypedDict", @@ -3592,16 +3603,20 @@ "AgentsCompletionRequestMessageTypedDict": ".agentscompletionrequest", "AgentsCompletionRequestStop": ".agentscompletionrequest", "AgentsCompletionRequestStopTypedDict": ".agentscompletionrequest", + "AgentsCompletionRequestTool": ".agentscompletionrequest", "AgentsCompletionRequestToolChoice": ".agentscompletionrequest", "AgentsCompletionRequestToolChoiceTypedDict": ".agentscompletionrequest", + "AgentsCompletionRequestToolTypedDict": ".agentscompletionrequest", "AgentsCompletionRequestTypedDict": ".agentscompletionrequest", "AgentsCompletionStreamRequest": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestMessage": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestMessageTypedDict": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestStop": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestStopTypedDict": ".agentscompletionstreamrequest", + "AgentsCompletionStreamRequestTool": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestToolChoice": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestToolChoiceTypedDict": ".agentscompletionstreamrequest", + "AgentsCompletionStreamRequestToolTypedDict": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestTypedDict": ".agentscompletionstreamrequest", "Annotations": ".annotations", "AnnotationsTypedDict": ".annotations", @@ -3677,8 +3692,10 @@ "ChatCompletionRequestMessageTypedDict": ".chatcompletionrequest", "ChatCompletionRequestStop": ".chatcompletionrequest", "ChatCompletionRequestStopTypedDict": ".chatcompletionrequest", + "ChatCompletionRequestTool": ".chatcompletionrequest", "ChatCompletionRequestToolChoice": ".chatcompletionrequest", "ChatCompletionRequestToolChoiceTypedDict": ".chatcompletionrequest", + "ChatCompletionRequestToolTypedDict": ".chatcompletionrequest", "ChatCompletionRequestTypedDict": ".chatcompletionrequest", "ChatCompletionResponse": ".chatcompletionresponse", "ChatCompletionResponseTypedDict": ".chatcompletionresponse", @@ -3687,8 +3704,10 @@ "ChatCompletionStreamRequestMessageTypedDict": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestStop": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestStopTypedDict": ".chatcompletionstreamrequest", + "ChatCompletionStreamRequestTool": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestToolChoice": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestToolChoiceTypedDict": ".chatcompletionstreamrequest", + "ChatCompletionStreamRequestToolTypedDict": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestTypedDict": ".chatcompletionstreamrequest", "ChatModerationRequest": ".chatmoderationrequest", "ChatModerationRequestInputs1": ".chatmoderationrequest", @@ -4735,7 +4754,6 @@ "ToolReferenceChunkToolTypedDict": ".toolreferencechunk", "ToolReferenceChunkTypedDict": ".toolreferencechunk", "ToolType": ".tooltype", - "ToolTypes": ".tooltypes", "TrainingFile": ".trainingfile", "TrainingFileTypedDict": ".trainingfile", "TranscriptionResponse": ".transcriptionresponse", @@ -4842,8 +4860,6 @@ "WebSearchPremiumToolTypedDict": ".websearchpremiumtool", "WebSearchTool": ".websearchtool", "WebSearchToolTypedDict": ".websearchtool", - "WorkerInfo": ".workerinfo", - "WorkerInfoTypedDict": ".workerinfo", "Workflow": ".workflow", "WorkflowTypedDict": ".workflow", "WorkflowArchiveResponse": ".workflowarchiveresponse", diff --git a/src/mistralai/client/models/agentscompletionrequest.py b/src/mistralai/client/models/agentscompletionrequest.py index f4ce34cb..a919dbc3 100644 --- a/src/mistralai/client/models/agentscompletionrequest.py +++ b/src/mistralai/client/models/agentscompletionrequest.py @@ -3,7 +3,11 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict +from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict +from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .reasoningeffort import ReasoningEffort @@ -14,6 +18,8 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict +from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict +from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -61,6 +67,31 @@ ] +AgentsCompletionRequestToolTypedDict = TypeAliasType( + "AgentsCompletionRequestToolTypedDict", + Union[ + ToolTypedDict, + WebSearchToolTypedDict, + WebSearchPremiumToolTypedDict, + CodeInterpreterToolTypedDict, + ImageGenerationToolTypedDict, + DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, + ], +) + + +AgentsCompletionRequestTool = Union[ + Tool, + WebSearchTool, + WebSearchPremiumTool, + CodeInterpreterTool, + ImageGenerationTool, + DocumentLibraryTool, + CustomConnector, +] + + AgentsCompletionRequestToolChoiceTypedDict = TypeAliasType( "AgentsCompletionRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -88,7 +119,7 @@ class AgentsCompletionRequestTypedDict(TypedDict): metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[List[ToolTypedDict]]] + tools: NotRequired[Nullable[List[AgentsCompletionRequestToolTypedDict]]] tool_choice: NotRequired[AgentsCompletionRequestToolChoiceTypedDict] presence_penalty: NotRequired[float] r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" @@ -129,7 +160,7 @@ class AgentsCompletionRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[List[Tool]] = UNSET + tools: OptionalNullable[List[AgentsCompletionRequestTool]] = UNSET tool_choice: Optional[AgentsCompletionRequestToolChoice] = None diff --git a/src/mistralai/client/models/agentscompletionstreamrequest.py b/src/mistralai/client/models/agentscompletionstreamrequest.py index 0feb3803..05df8ae7 100644 --- a/src/mistralai/client/models/agentscompletionstreamrequest.py +++ b/src/mistralai/client/models/agentscompletionstreamrequest.py @@ -3,7 +3,11 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict +from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict +from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .reasoningeffort import ReasoningEffort @@ -14,6 +18,8 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict +from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict +from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -61,6 +67,31 @@ ] +AgentsCompletionStreamRequestToolTypedDict = TypeAliasType( + "AgentsCompletionStreamRequestToolTypedDict", + Union[ + ToolTypedDict, + WebSearchToolTypedDict, + WebSearchPremiumToolTypedDict, + CodeInterpreterToolTypedDict, + ImageGenerationToolTypedDict, + DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, + ], +) + + +AgentsCompletionStreamRequestTool = Union[ + Tool, + WebSearchTool, + WebSearchPremiumTool, + CodeInterpreterTool, + ImageGenerationTool, + DocumentLibraryTool, + CustomConnector, +] + + AgentsCompletionStreamRequestToolChoiceTypedDict = TypeAliasType( "AgentsCompletionStreamRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -87,7 +118,7 @@ class AgentsCompletionStreamRequestTypedDict(TypedDict): metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[List[ToolTypedDict]]] + tools: NotRequired[Nullable[List[AgentsCompletionStreamRequestToolTypedDict]]] tool_choice: NotRequired[AgentsCompletionStreamRequestToolChoiceTypedDict] presence_penalty: NotRequired[float] r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" @@ -127,7 +158,7 @@ class AgentsCompletionStreamRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[List[Tool]] = UNSET + tools: OptionalNullable[List[AgentsCompletionStreamRequestTool]] = UNSET tool_choice: Optional[AgentsCompletionStreamRequestToolChoice] = None diff --git a/src/mistralai/client/models/chatcompletionrequest.py b/src/mistralai/client/models/chatcompletionrequest.py index f1b0b2d6..1d0cf90d 100644 --- a/src/mistralai/client/models/chatcompletionrequest.py +++ b/src/mistralai/client/models/chatcompletionrequest.py @@ -3,7 +3,11 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict +from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict +from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .reasoningeffort import ReasoningEffort @@ -14,6 +18,8 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict +from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict +from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -61,6 +67,31 @@ ] +ChatCompletionRequestToolTypedDict = TypeAliasType( + "ChatCompletionRequestToolTypedDict", + Union[ + ToolTypedDict, + WebSearchToolTypedDict, + WebSearchPremiumToolTypedDict, + CodeInterpreterToolTypedDict, + ImageGenerationToolTypedDict, + DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, + ], +) + + +ChatCompletionRequestTool = Union[ + Tool, + WebSearchTool, + WebSearchPremiumTool, + CodeInterpreterTool, + ImageGenerationTool, + DocumentLibraryTool, + CustomConnector, +] + + ChatCompletionRequestToolChoiceTypedDict = TypeAliasType( "ChatCompletionRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -94,7 +125,7 @@ class ChatCompletionRequestTypedDict(TypedDict): metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[List[ToolTypedDict]]] + tools: NotRequired[Nullable[List[ChatCompletionRequestToolTypedDict]]] r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: NotRequired[ChatCompletionRequestToolChoiceTypedDict] r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" @@ -146,7 +177,7 @@ class ChatCompletionRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[List[Tool]] = UNSET + tools: OptionalNullable[List[ChatCompletionRequestTool]] = UNSET r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: Optional[ChatCompletionRequestToolChoice] = None diff --git a/src/mistralai/client/models/chatcompletionstreamrequest.py b/src/mistralai/client/models/chatcompletionstreamrequest.py index d9f413c6..5cdccafb 100644 --- a/src/mistralai/client/models/chatcompletionstreamrequest.py +++ b/src/mistralai/client/models/chatcompletionstreamrequest.py @@ -3,7 +3,11 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict +from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict +from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .reasoningeffort import ReasoningEffort @@ -14,6 +18,8 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict +from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict +from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -61,6 +67,31 @@ ] +ChatCompletionStreamRequestToolTypedDict = TypeAliasType( + "ChatCompletionStreamRequestToolTypedDict", + Union[ + ToolTypedDict, + WebSearchToolTypedDict, + WebSearchPremiumToolTypedDict, + CodeInterpreterToolTypedDict, + ImageGenerationToolTypedDict, + DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, + ], +) + + +ChatCompletionStreamRequestTool = Union[ + Tool, + WebSearchTool, + WebSearchPremiumTool, + CodeInterpreterTool, + ImageGenerationTool, + DocumentLibraryTool, + CustomConnector, +] + + ChatCompletionStreamRequestToolChoiceTypedDict = TypeAliasType( "ChatCompletionStreamRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -93,7 +124,7 @@ class ChatCompletionStreamRequestTypedDict(TypedDict): metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[List[ToolTypedDict]]] + tools: NotRequired[Nullable[List[ChatCompletionStreamRequestToolTypedDict]]] r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: NotRequired[ChatCompletionStreamRequestToolChoiceTypedDict] r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" @@ -144,7 +175,7 @@ class ChatCompletionStreamRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[List[Tool]] = UNSET + tools: OptionalNullable[List[ChatCompletionStreamRequestTool]] = UNSET r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: Optional[ChatCompletionStreamRequestToolChoice] = None diff --git a/src/mistralai/client/models/files_api_routes_get_signed_urlop.py b/src/mistralai/client/models/files_api_routes_get_signed_urlop.py index 326dd1d3..c381244b 100644 --- a/src/mistralai/client/models/files_api_routes_get_signed_urlop.py +++ b/src/mistralai/client/models/files_api_routes_get_signed_urlop.py @@ -12,7 +12,7 @@ class FilesAPIRoutesGetSignedURLRequestTypedDict(TypedDict): file_id: str expiry: NotRequired[int] - r"""Number of hours before the url becomes invalid. Defaults to 24h""" + r"""Number of hours before the URL becomes invalid. Defaults to 24h. Must be between 1h and 168h.""" class FilesAPIRoutesGetSignedURLRequest(BaseModel): @@ -24,7 +24,7 @@ class FilesAPIRoutesGetSignedURLRequest(BaseModel): Optional[int], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = 24 - r"""Number of hours before the url becomes invalid. Defaults to 24h""" + r"""Number of hours before the URL becomes invalid. Defaults to 24h. Must be between 1h and 168h.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/ftmodelcard.py b/src/mistralai/client/models/ftmodelcard.py index 922667b0..bb7c52c8 100644 --- a/src/mistralai/client/models/ftmodelcard.py +++ b/src/mistralai/client/models/ftmodelcard.py @@ -27,6 +27,7 @@ class FTModelCardTypedDict(TypedDict): r"""This is populated by Harmattan, but some fields have a name that we don't want to expose in the API. """ + job: str root: str object: NotRequired[str] created: NotRequired[int] @@ -39,7 +40,6 @@ class FTModelCardTypedDict(TypedDict): deprecation_replacement_model: NotRequired[Nullable[str]] default_model_temperature: NotRequired[Nullable[float]] type: Literal["fine-tuned"] - job: NotRequired[Nullable[str]] archived: NotRequired[bool] @@ -53,6 +53,8 @@ class FTModelCard(BaseModel): that we don't want to expose in the API. """ + job: str + root: str object: Optional[str] = "model" @@ -80,8 +82,6 @@ class FTModelCard(BaseModel): pydantic.Field(alias="type"), ] = "fine-tuned" - job: OptionalNullable[str] = UNSET - archived: Optional[bool] = False @model_serializer(mode="wrap") @@ -98,7 +98,6 @@ def serialize_model(self, handler): "deprecation", "deprecation_replacement_model", "default_model_temperature", - "job", "archived", ] ) @@ -109,7 +108,6 @@ def serialize_model(self, handler): "deprecation", "deprecation_replacement_model", "default_model_temperature", - "job", ] ) serialized = handler(self) diff --git a/src/mistralai/client/models/library.py b/src/mistralai/client/models/library.py index c26710ff..0e09cfaa 100644 --- a/src/mistralai/client/models/library.py +++ b/src/mistralai/client/models/library.py @@ -10,8 +10,9 @@ UNSET, UNSET_SENTINEL, ) +import pydantic from pydantic import model_serializer -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class LibraryTypedDict(TypedDict): @@ -63,7 +64,12 @@ class Library(BaseModel): explicit_workspace_members_count: OptionalNullable[int] = UNSET - org_sharing_role: OptionalNullable[str] = UNSET + org_sharing_role: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET generated_name: OptionalNullable[str] = UNSET r"""Generated Name""" diff --git a/src/mistralai/client/models/observabilityerrorcode.py b/src/mistralai/client/models/observabilityerrorcode.py index 99360d41..f7ff71f8 100644 --- a/src/mistralai/client/models/observabilityerrorcode.py +++ b/src/mistralai/client/models/observabilityerrorcode.py @@ -50,7 +50,10 @@ "EVALUATION_RUN_TRANSITION_IS_INVALID", "EVALUATION_RUN_TRANSITION_IS_RUNNING_ALREADY", "EVALUATION_RUN_TRANSITION_ERROR", + "TEMPLATE_ERROR", "TEMPLATE_SYNTAX_ERROR", + "PROJECT_NAME_ALREADY_EXISTS", + "EVALUATION_NAME_ALREADY_EXISTS", ], UnrecognizedStr, ] diff --git a/src/mistralai/client/models/tool.py b/src/mistralai/client/models/tool.py index 1d1c5ce5..a83a6d1c 100644 --- a/src/mistralai/client/models/tool.py +++ b/src/mistralai/client/models/tool.py @@ -3,35 +3,32 @@ from __future__ import annotations from .function import Function, FunctionTypedDict -from .tooltypes import ToolTypes -from mistralai.client.types import BaseModel, UNSET_SENTINEL -from pydantic import model_serializer -from typing import Optional -from typing_extensions import NotRequired, TypedDict +from mistralai.client.types import BaseModel, UnrecognizedStr +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal, Union +from typing_extensions import Annotated, TypedDict class ToolTypedDict(TypedDict): function: FunctionTypedDict - type: NotRequired[ToolTypes] + type: Union[Literal["function"], UnrecognizedStr] class Tool(BaseModel): function: Function - type: Optional[ToolTypes] = None + type: Annotated[ + Annotated[ + Union[Literal["function"], UnrecognizedStr], + AfterValidator(validate_const("function")), + ], + pydantic.Field(alias="type"), + ] = "function" - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set(["type"]) - serialized = handler(self) - m = {} - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - - if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: - m[k] = val - - return m +try: + Tool.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/toolcall.py b/src/mistralai/client/models/toolcall.py index 29f1149c..1424d879 100644 --- a/src/mistralai/client/models/toolcall.py +++ b/src/mistralai/client/models/toolcall.py @@ -3,7 +3,6 @@ from __future__ import annotations from .functioncall import FunctionCall, FunctionCallTypedDict -from .tooltypes import ToolTypes from mistralai.client.types import BaseModel, UNSET_SENTINEL from pydantic import model_serializer from typing import Optional @@ -13,7 +12,7 @@ class ToolCallTypedDict(TypedDict): function: FunctionCallTypedDict id: NotRequired[str] - type: NotRequired[ToolTypes] + type: NotRequired[str] index: NotRequired[int] @@ -22,7 +21,7 @@ class ToolCall(BaseModel): id: Optional[str] = "null" - type: Optional[ToolTypes] = None + type: Optional[str] = None index: Optional[int] = 0 diff --git a/src/mistralai/client/models/toolchoice.py b/src/mistralai/client/models/toolchoice.py index ce84573a..e7a17d5c 100644 --- a/src/mistralai/client/models/toolchoice.py +++ b/src/mistralai/client/models/toolchoice.py @@ -3,7 +3,6 @@ from __future__ import annotations from .functionname import FunctionName, FunctionNameTypedDict -from .tooltypes import ToolTypes from mistralai.client.types import BaseModel, UNSET_SENTINEL from pydantic import model_serializer from typing import Optional @@ -15,7 +14,7 @@ class ToolChoiceTypedDict(TypedDict): function: FunctionNameTypedDict r"""this restriction of `Function` is used to select a specific function to call""" - type: NotRequired[ToolTypes] + type: NotRequired[str] class ToolChoice(BaseModel): @@ -24,7 +23,7 @@ class ToolChoice(BaseModel): function: FunctionName r"""this restriction of `Function` is used to select a specific function to call""" - type: Optional[ToolTypes] = None + type: Optional[str] = None @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/tooltypes.py b/src/mistralai/client/models/tooltypes.py deleted file mode 100644 index e601c196..00000000 --- a/src/mistralai/client/models/tooltypes.py +++ /dev/null @@ -1,9 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 86c3b54272fd - -from __future__ import annotations -from mistralai.client.types import UnrecognizedStr -from typing import Literal, Union - - -ToolTypes = Union[Literal["function",], UnrecognizedStr] diff --git a/src/mistralai/client/models/workerinfo.py b/src/mistralai/client/models/workerinfo.py deleted file mode 100644 index 65edcec6..00000000 --- a/src/mistralai/client/models/workerinfo.py +++ /dev/null @@ -1,38 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 0c231087534e - -from __future__ import annotations -from mistralai.client.types import BaseModel, UNSET_SENTINEL -from pydantic import model_serializer -from typing import Optional -from typing_extensions import NotRequired, TypedDict - - -class WorkerInfoTypedDict(TypedDict): - scheduler_url: str - namespace: str - tls: NotRequired[bool] - - -class WorkerInfo(BaseModel): - scheduler_url: str - - namespace: str - - tls: Optional[bool] = False - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set(["tls"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - - if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: - m[k] = val - - return m diff --git a/src/mistralai/client/models/workflowexecutionrequest.py b/src/mistralai/client/models/workflowexecutionrequest.py index bf6a5fa0..615276d3 100644 --- a/src/mistralai/client/models/workflowexecutionrequest.py +++ b/src/mistralai/client/models/workflowexecutionrequest.py @@ -19,8 +19,8 @@ class WorkflowExecutionRequestTypedDict(TypedDict): execution_id: NotRequired[Nullable[str]] r"""Allows you to specify a custom execution ID. If not provided, a random ID will be generated.""" - input: NotRequired[Nullable[Dict[str, Any]]] - r"""The input to the workflow. This should be a dictionary that matches the workflow's input schema.""" + input: NotRequired[Nullable[Any]] + r"""The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema.""" encoded_input: NotRequired[Nullable[NetworkEncodedInputTypedDict]] r"""Encoded input to the workflow, used when payload encoding is enabled.""" wait_for_result: NotRequired[bool] @@ -38,8 +38,8 @@ class WorkflowExecutionRequest(BaseModel): execution_id: OptionalNullable[str] = UNSET r"""Allows you to specify a custom execution ID. If not provided, a random ID will be generated.""" - input: OptionalNullable[Dict[str, Any]] = UNSET - r"""The input to the workflow. This should be a dictionary that matches the workflow's input schema.""" + input: OptionalNullable[Any] = UNSET + r"""The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema.""" encoded_input: OptionalNullable[NetworkEncodedInput] = UNSET r"""Encoded input to the workflow, used when payload encoding is enabled.""" diff --git a/src/mistralai/client/models/workflowregistration.py b/src/mistralai/client/models/workflowregistration.py index e23f9fb2..7c65801d 100644 --- a/src/mistralai/client/models/workflowregistration.py +++ b/src/mistralai/client/models/workflowregistration.py @@ -14,19 +14,22 @@ UNSET, UNSET_SENTINEL, ) +import pydantic from pydantic import model_serializer from typing import Optional -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class WorkflowRegistrationTypedDict(TypedDict): id: str r"""Unique identifier of the workflow registration""" - task_queue: str - r"""Project name of the workflow""" definition: WorkflowCodeDefinitionTypedDict workflow_id: str r"""Workflow ID of the workflow""" + deployment_id: NotRequired[Nullable[str]] + r"""Deployment ID this registration belongs to""" + task_queue: NotRequired[Nullable[str]] + r"""Deprecated. Use deployment_id instead. Will be removed in a future release.""" workflow: NotRequired[Nullable[WorkflowTypedDict]] r"""Workflow of the workflow registration""" compatible_with_chat_assistant: NotRequired[bool] @@ -37,14 +40,22 @@ class WorkflowRegistration(BaseModel): id: str r"""Unique identifier of the workflow registration""" - task_queue: str - r"""Project name of the workflow""" - definition: WorkflowCodeDefinition workflow_id: str r"""Workflow ID of the workflow""" + deployment_id: OptionalNullable[str] = UNSET + r"""Deployment ID this registration belongs to""" + + task_queue: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET + r"""Deprecated. Use deployment_id instead. Will be removed in a future release.""" + workflow: OptionalNullable[Workflow] = UNSET r"""Workflow of the workflow registration""" @@ -53,8 +64,15 @@ class WorkflowRegistration(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["workflow", "compatible_with_chat_assistant"]) - nullable_fields = set(["workflow"]) + optional_fields = set( + [ + "deployment_id", + "task_queue", + "workflow", + "compatible_with_chat_assistant", + ] + ) + nullable_fields = set(["deployment_id", "task_queue", "workflow"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/workflowregistrationwithworkerstatus.py b/src/mistralai/client/models/workflowregistrationwithworkerstatus.py index c0d9a69e..62c379d9 100644 --- a/src/mistralai/client/models/workflowregistrationwithworkerstatus.py +++ b/src/mistralai/client/models/workflowregistrationwithworkerstatus.py @@ -14,21 +14,24 @@ UNSET, UNSET_SENTINEL, ) +import pydantic from pydantic import model_serializer from typing import Optional -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class WorkflowRegistrationWithWorkerStatusTypedDict(TypedDict): id: str r"""Unique identifier of the workflow registration""" - task_queue: str - r"""Project name of the workflow""" definition: WorkflowCodeDefinitionTypedDict workflow_id: str r"""Workflow ID of the workflow""" active: bool r"""Whether the workflow registration is active""" + deployment_id: NotRequired[Nullable[str]] + r"""Deployment ID this registration belongs to""" + task_queue: NotRequired[Nullable[str]] + r"""Deprecated. Use deployment_id instead. Will be removed in a future release.""" workflow: NotRequired[Nullable[WorkflowTypedDict]] r"""Workflow of the workflow registration""" compatible_with_chat_assistant: NotRequired[bool] @@ -39,9 +42,6 @@ class WorkflowRegistrationWithWorkerStatus(BaseModel): id: str r"""Unique identifier of the workflow registration""" - task_queue: str - r"""Project name of the workflow""" - definition: WorkflowCodeDefinition workflow_id: str @@ -50,6 +50,17 @@ class WorkflowRegistrationWithWorkerStatus(BaseModel): active: bool r"""Whether the workflow registration is active""" + deployment_id: OptionalNullable[str] = UNSET + r"""Deployment ID this registration belongs to""" + + task_queue: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET + r"""Deprecated. Use deployment_id instead. Will be removed in a future release.""" + workflow: OptionalNullable[Workflow] = UNSET r"""Workflow of the workflow registration""" @@ -58,8 +69,15 @@ class WorkflowRegistrationWithWorkerStatus(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["workflow", "compatible_with_chat_assistant"]) - nullable_fields = set(["workflow"]) + optional_fields = set( + [ + "deployment_id", + "task_queue", + "workflow", + "compatible_with_chat_assistant", + ] + ) + nullable_fields = set(["deployment_id", "task_queue", "workflow"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/runs.py b/src/mistralai/client/runs.py index 3e875ba8..4a468f47 100644 --- a/src/mistralai/client/runs.py +++ b/src/mistralai/client/runs.py @@ -114,7 +114,7 @@ def next_func() -> Optional[models.ListRunsV1WorkflowsRunsGetResponse]: results = JSONPath("$.executions").parse(body) if len(results) == 0 or len(results[0]) == 0: return None - limit = request.page_size if not request.page_size is None else 50 + limit = request.page_size if isinstance(request.page_size, int) else 50 if len(results[0]) < limit: return None @@ -125,6 +125,9 @@ def next_func() -> Optional[models.ListRunsV1WorkflowsRunsGetResponse]: page_size=page_size, next_page_token=next_cursor, retries=retries, + server_url=server_url, + timeout_ms=timeout_ms, + http_headers=http_headers, ) response_data: Any = None @@ -256,7 +259,7 @@ async def empty_result(): results = JSONPath("$.executions").parse(body) if len(results) == 0 or len(results[0]) == 0: return empty_result() - limit = request.page_size if not request.page_size is None else 50 + limit = request.page_size if isinstance(request.page_size, int) else 50 if len(results[0]) < limit: return empty_result() @@ -267,6 +270,9 @@ async def empty_result(): page_size=page_size, next_page_token=next_cursor, retries=retries, + server_url=server_url, + timeout_ms=timeout_ms, + http_headers=http_headers, ) response_data: Any = None diff --git a/src/mistralai/client/utils/metadata.py b/src/mistralai/client/utils/metadata.py index d46ffa59..3850a6ff 100644 --- a/src/mistralai/client/utils/metadata.py +++ b/src/mistralai/client/utils/metadata.py @@ -16,6 +16,7 @@ class SecurityMetadata: scheme_type: Optional[str] = None sub_type: Optional[str] = None field_name: Optional[str] = None + composite: bool = False def get_field_name(self, default: str) -> str: return self.field_name or default diff --git a/src/mistralai/client/utils/security.py b/src/mistralai/client/utils/security.py index d8b9d8fe..77a4449d 100644 --- a/src/mistralai/client/utils/security.py +++ b/src/mistralai/client/utils/security.py @@ -20,7 +20,9 @@ import os -def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, List[str]]]: +def get_security( + security: Any, allowed_fields: Optional[List[str]] = None +) -> Tuple[Dict[str, str], Dict[str, List[str]]]: headers: Dict[str, str] = {} query_params: Dict[str, List[str]] = {} @@ -31,7 +33,14 @@ def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, List[str]]]: raise TypeError("security must be a pydantic model") sec_fields: Dict[str, FieldInfo] = security.__class__.model_fields - for name in sec_fields: + sec_field_names = ( + list(sec_fields.keys()) if allowed_fields is None else allowed_fields + ) + + for name in sec_field_names: + if name not in sec_fields: + continue + sec_field = sec_fields[name] value = getattr(security, name) @@ -53,6 +62,9 @@ def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, List[str]]]: else: _parse_security_scheme(headers, query_params, metadata, name, value) + if not metadata.composite: + return headers, query_params + return headers, query_params @@ -78,15 +90,24 @@ def _parse_security_option( raise TypeError("security option must be a pydantic model") opt_fields: Dict[str, FieldInfo] = option.__class__.model_fields + for name in opt_fields: opt_field = opt_fields[name] metadata = find_field_metadata(opt_field, SecurityMetadata) if metadata is None or not metadata.scheme: continue - _parse_security_scheme( - headers, query_params, metadata, name, getattr(option, name) - ) + + value = getattr(option, name) + if ( + metadata.scheme_type == "http" + and metadata.sub_type == "basic" + and not isinstance(value, BaseModel) + ): + _parse_basic_auth_scheme(headers, option) + return + + _parse_security_scheme(headers, query_params, metadata, name, value) def _parse_security_scheme( diff --git a/src/mistralai/client/utils/serializers.py b/src/mistralai/client/utils/serializers.py index fbc2772d..691957f4 100644 --- a/src/mistralai/client/utils/serializers.py +++ b/src/mistralai/client/utils/serializers.py @@ -18,8 +18,7 @@ def serialize_decimal(as_str: bool): def serialize(d): - # Optional[T] is a Union[T, None] - if is_union(type(d)) and type(None) in get_args(type(d)) and d is None: + if d is None: return None if isinstance(d, Unset): return d @@ -47,8 +46,7 @@ def validate_decimal(d): def serialize_float(as_str: bool): def serialize(f): - # Optional[T] is a Union[T, None] - if is_union(type(f)) and type(None) in get_args(type(f)) and f is None: + if f is None: return None if isinstance(f, Unset): return f @@ -76,8 +74,7 @@ def validate_float(f): def serialize_int(as_str: bool): def serialize(i): - # Optional[T] is a Union[T, None] - if is_union(type(i)) and type(None) in get_args(type(i)) and i is None: + if i is None: return None if isinstance(i, Unset): return i @@ -105,8 +102,7 @@ def validate_int(b): def validate_const(v): def validate(c): - # Optional[T] is a Union[T, None] - if is_union(type(c)) and type(None) in get_args(type(c)) and c is None: + if c is None: return None if v != c: diff --git a/src/mistralai/client/workers.py b/src/mistralai/client/workers.py deleted file mode 100644 index e2d41c70..00000000 --- a/src/mistralai/client/workers.py +++ /dev/null @@ -1,162 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 54a46aba8359 - -from .basesdk import BaseSDK -from mistralai.client import errors, models, utils -from mistralai.client._hooks import HookContext -from mistralai.client.types import OptionalNullable, UNSET -from mistralai.client.utils import get_security_from_env -from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response -from typing import Mapping, Optional - - -class Workers(BaseSDK): - def whoami( - self, - *, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.WorkerInfo: - r"""Get Worker Info - - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - req = self._build_request( - method="GET", - path="/v1/workflows/workers/whoami", - base_url=base_url, - url_variables=url_variables, - request=None, - request_body_required=False, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - allow_empty_value=None, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["429", "500", "502", "503", "504"]) - - http_res = self.do_request( - hook_ctx=HookContext( - config=self.sdk_configuration, - base_url=base_url or "", - operation_id="get_worker_info_v1_workflows_workers_whoami_get", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - ), - request=req, - error_status_codes=["4XX", "5XX"], - retry_config=retry_config, - ) - - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.WorkerInfo, http_res) - if utils.match_response(http_res, "4XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - - raise errors.SDKError("Unexpected response received", http_res) - - async def whoami_async( - self, - *, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.WorkerInfo: - r"""Get Worker Info - - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - req = self._build_request_async( - method="GET", - path="/v1/workflows/workers/whoami", - base_url=base_url, - url_variables=url_variables, - request=None, - request_body_required=False, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - allow_empty_value=None, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["429", "500", "502", "503", "504"]) - - http_res = await self.do_request_async( - hook_ctx=HookContext( - config=self.sdk_configuration, - base_url=base_url or "", - operation_id="get_worker_info_v1_workflows_workers_whoami_get", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - ), - request=req, - error_status_codes=["4XX", "5XX"], - retry_config=retry_config, - ) - - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.WorkerInfo, http_res) - if utils.match_response(http_res, "4XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - - raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/workflows.py b/src/mistralai/client/workflows.py index aae12f77..83917a95 100644 --- a/src/mistralai/client/workflows.py +++ b/src/mistralai/client/workflows.py @@ -14,7 +14,6 @@ from mistralai.client.types import OptionalNullable, UNSET from mistralai.client.utils import get_security_from_env from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response -from mistralai.client.workers import Workers from mistralai.client.workflows_events import WorkflowsEvents from typing import Any, Awaitable, Dict, List, Mapping, Optional, Union from typing_extensions import deprecated @@ -30,7 +29,6 @@ class Workflows(BaseSDK): metrics: Metrics runs: Runs schedules: Schedules - workers: Workers events: WorkflowsEvents deployments: Deployments @@ -46,7 +44,6 @@ def _init_sdks(self): self.metrics = Metrics(self.sdk_configuration, parent_ref=self.parent_ref) self.runs = Runs(self.sdk_configuration, parent_ref=self.parent_ref) self.schedules = Schedules(self.sdk_configuration, parent_ref=self.parent_ref) - self.workers = Workers(self.sdk_configuration, parent_ref=self.parent_ref) self.events = WorkflowsEvents( self.sdk_configuration, parent_ref=self.parent_ref ) @@ -354,7 +351,7 @@ def next_func() -> Optional[models.GetWorkflowsV1WorkflowsGetResponse]: results = JSONPath("$.workflows").parse(body) if len(results) == 0 or len(results[0]) == 0: return None - limit = request.limit if not request.limit is None else 50 + limit = request.limit if isinstance(request.limit, int) else 50 if len(results[0]) < limit: return None @@ -366,6 +363,9 @@ def next_func() -> Optional[models.GetWorkflowsV1WorkflowsGetResponse]: cursor=next_cursor, limit=limit, retries=retries, + server_url=server_url, + timeout_ms=timeout_ms, + http_headers=http_headers, ) response_data: Any = None @@ -493,7 +493,7 @@ async def empty_result(): results = JSONPath("$.workflows").parse(body) if len(results) == 0 or len(results[0]) == 0: return empty_result() - limit = request.limit if not request.limit is None else 50 + limit = request.limit if isinstance(request.limit, int) else 50 if len(results[0]) < limit: return empty_result() @@ -505,6 +505,9 @@ async def empty_result(): cursor=next_cursor, limit=limit, retries=retries, + server_url=server_url, + timeout_ms=timeout_ms, + http_headers=http_headers, ) response_data: Any = None @@ -766,7 +769,7 @@ def execute_workflow( *, workflow_identifier: str, execution_id: OptionalNullable[str] = UNSET, - input: OptionalNullable[Dict[str, Any]] = UNSET, + input: OptionalNullable[Any] = UNSET, encoded_input: OptionalNullable[ Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] ] = UNSET, @@ -784,7 +787,7 @@ def execute_workflow( :param workflow_identifier: :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. - :param input: The input to the workflow. This should be a dictionary that matches the workflow's input schema. + :param input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. @@ -894,7 +897,7 @@ async def execute_workflow_async( *, workflow_identifier: str, execution_id: OptionalNullable[str] = UNSET, - input: OptionalNullable[Dict[str, Any]] = UNSET, + input: OptionalNullable[Any] = UNSET, encoded_input: OptionalNullable[ Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] ] = UNSET, @@ -912,7 +915,7 @@ async def execute_workflow_async( :param workflow_identifier: :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. - :param input: The input to the workflow. This should be a dictionary that matches the workflow's input schema. + :param input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. @@ -1025,7 +1028,7 @@ def execute_workflow_registration( *, workflow_registration_id: str, execution_id: OptionalNullable[str] = UNSET, - input: OptionalNullable[Dict[str, Any]] = UNSET, + input: OptionalNullable[Any] = UNSET, encoded_input: OptionalNullable[ Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] ] = UNSET, @@ -1043,7 +1046,7 @@ def execute_workflow_registration( :param workflow_registration_id: :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. - :param input: The input to the workflow. This should be a dictionary that matches the workflow's input schema. + :param input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. @@ -1156,7 +1159,7 @@ async def execute_workflow_registration_async( *, workflow_registration_id: str, execution_id: OptionalNullable[str] = UNSET, - input: OptionalNullable[Dict[str, Any]] = UNSET, + input: OptionalNullable[Any] = UNSET, encoded_input: OptionalNullable[ Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] ] = UNSET, @@ -1174,7 +1177,7 @@ async def execute_workflow_registration_async( :param workflow_registration_id: :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. - :param input: The input to the workflow. This should be a dictionary that matches the workflow's input schema. + :param input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. From 0a0f6949854207a177b924ddbd7508767e12d9da Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 3 Apr 2026 10:26:26 +0000 Subject: [PATCH 2/4] chore: align pyproject.toml and uv.lock to version 2.2.1 --- pyproject.toml | 2 +- uv.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 54d2b372..83af6e8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.2.0" +version = "2.2.1" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/uv.lock b/uv.lock index ae8cabb5..8b5c0cfe 100644 --- a/uv.lock +++ b/uv.lock @@ -560,7 +560,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.2.0" +version = "2.2.1" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From a7ede3af37576d0247c0a0a8e67acfd99636c1dc Mon Sep 17 00:00:00 2001 From: Louis Sanna Date: Fri, 3 Apr 2026 12:42:52 +0200 Subject: [PATCH 3/4] chore: trigger CI From 4affc505316b0e1dc07e516b58a5154b18e22c52 Mon Sep 17 00:00:00 2001 From: Antoine Hoorelbeke Date: Thu, 2 Apr 2026 14:02:26 +0200 Subject: [PATCH 4/4] custom code: change type hinting execute_workflow_and_wait to handle pydantic BaseModel --- src/mistralai/client/workflows.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mistralai/client/workflows.py b/src/mistralai/client/workflows.py index 83917a95..5078cc3b 100644 --- a/src/mistralai/client/workflows.py +++ b/src/mistralai/client/workflows.py @@ -20,6 +20,7 @@ # region imports import asyncio +from pydantic import BaseModel import time # endregion imports @@ -55,7 +56,7 @@ def _init_sdks(self): def execute_workflow_and_wait( self, workflow_identifier: str, - input: OptionalNullable[Dict[str, Any]] = UNSET, + input: OptionalNullable[Dict[str, Any] | BaseModel] = UNSET, execution_id: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, @@ -68,7 +69,7 @@ def execute_workflow_and_wait( Args: workflow_identifier: The workflow name or ID. - input: Input parameters for the workflow + input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. execution_id: Optional custom execution ID deployment_name: Name of the deployment to route this execution to custom_tracing_attributes: Custom tracing attributes @@ -152,7 +153,7 @@ def wait_for_workflow_completion( async def execute_workflow_and_wait_async( self, workflow_identifier: str, - input: OptionalNullable[Dict[str, Any]] = UNSET, + input: OptionalNullable[Dict[str, Any] | BaseModel] = UNSET, execution_id: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, @@ -165,7 +166,7 @@ async def execute_workflow_and_wait_async( Args: workflow_identifier: The workflow name or ID. - input: Input parameters for the workflow + input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. execution_id: Optional custom execution ID deployment_name: Name of the deployment to route this execution to custom_tracing_attributes: Custom tracing attributes