From 516ec028ab75f6e5871206c5185767db42d915c6 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 3 Apr 2026 12:21:34 +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(InstructRequest).messages[].union(assistant).tool=5F?= =?UTF-8?q?calls[].type`=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)?= =?UTF-8?q?=20*=20`mistral.classifiers.moderate=5Fchat()`:=20=20=20*=20=20?= =?UTF-8?q?`request.inputs.union(Array<>)[].union(assistant).tool=5Fcalls[?= =?UTF-8?q?].type`=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`?= =?UTF-8?q?mistral.agents.stream()`:=20=20=20*=20=20`request`=20**Changed*?= =?UTF-8?q?*=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20=20=20*=20=20`response.[]?= =?UTF-8?q?.data.choices[].delta.tool=5Fcalls[].type`=20**Changed**=20(Bre?= =?UTF-8?q?aking=20=E2=9A=A0=EF=B8=8F)=20*=20`mistral.agents.complete()`:?= =?UTF-8?q?=20=20=20*=20=20`request`=20**Changed**=20(Breaking=20=E2=9A=A0?= =?UTF-8?q?=EF=B8=8F)=20=20=20*=20=20`response.choices[].message.tool=5Fca?= =?UTF-8?q?lls[].type`=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*?= =?UTF-8?q?=20`mistral.beta.observability.datasets.list()`:=20=20`error.de?= =?UTF-8?q?tail.error=5Fcode`=20**Changed**=20*=20`mistral.beta.observabil?= =?UTF-8?q?ity.datasets.import=5Ffrom=5Fexplorer()`:=20=20`error.detail.er?= =?UTF-8?q?ror=5Fcode`=20**Changed**=20*=20`mistral.beta.observability.jud?= =?UTF-8?q?ges.list()`:=20=20`error.detail.error=5Fcode`=20**Changed**=20*?= =?UTF-8?q?=20`mistral.beta.observability.judges.fetch()`:=20=20`error.det?= =?UTF-8?q?ail.error=5Fcode`=20**Changed**=20*=20`mistral.beta.observabili?= =?UTF-8?q?ty.judges.delete()`:=20=20`error.detail.error=5Fcode`=20**Chang?= =?UTF-8?q?ed**=20*=20`mistral.beta.observability.judges.update()`:=20=20`?= =?UTF-8?q?error.detail.error=5Fcode`=20**Changed**=20*=20`mistral.beta.ob?= =?UTF-8?q?servability.judges.judge=5Fconversation()`:=20=20`error.detail.?= =?UTF-8?q?error=5Fcode`=20**Changed**=20*=20`mistral.beta.observability.c?= =?UTF-8?q?ampaigns.create()`:=20=20`error.detail.error=5Fcode`=20**Change?= =?UTF-8?q?d**=20*=20`mistral.beta.observability.campaigns.list()`:=20=20`?= =?UTF-8?q?error.detail.error=5Fcode`=20**Changed**=20*=20`mistral.beta.ob?= =?UTF-8?q?servability.campaigns.fetch()`:=20=20`error.detail.error=5Fcode?= =?UTF-8?q?`=20**Changed**=20*=20`mistral.beta.observability.campaigns.del?= =?UTF-8?q?ete()`:=20=20`error.detail.error=5Fcode`=20**Changed**=20*=20`m?= =?UTF-8?q?istral.beta.observability.campaigns.fetch=5Fstatus()`:=20=20`er?= =?UTF-8?q?ror.detail.error=5Fcode`=20**Changed**=20*=20`mistral.beta.obse?= =?UTF-8?q?rvability.campaigns.list=5Fevents()`:=20=20`error.detail.error?= =?UTF-8?q?=5Fcode`=20**Changed**=20*=20`mistral.beta.observability.datase?= =?UTF-8?q?ts.create()`:=20=20`error.detail.error=5Fcode`=20**Changed**=20?= =?UTF-8?q?*=20`mistral.beta.observability.chat=5Fcompletion=5Fevents.fiel?= =?UTF-8?q?ds.fetch=5Foption=5Fcounts()`:=20=20`error.detail.error=5Fcode`?= =?UTF-8?q?=20**Changed**=20*=20`mistral.beta.observability.datasets.fetch?= =?UTF-8?q?()`:=20=20`error.detail.error=5Fcode`=20**Changed**=20*=20`mist?= =?UTF-8?q?ral.beta.observability.datasets.delete()`:=20=20`error.detail.e?= =?UTF-8?q?rror=5Fcode`=20**Changed**=20*=20`mistral.beta.observability.da?= =?UTF-8?q?tasets.update()`:=20=20`error.detail.error=5Fcode`=20**Changed*?= =?UTF-8?q?*=20*=20`mistral.beta.observability.datasets.list=5Frecords()`:?= =?UTF-8?q?=20=20`error.detail.error=5Fcode`=20**Changed**=20*=20`mistral.?= =?UTF-8?q?beta.observability.datasets.create=5Frecord()`:=20=20`error.det?= =?UTF-8?q?ail.error=5Fcode`=20**Changed**=20*=20`mistral.beta.observabili?= =?UTF-8?q?ty.datasets.import=5Ffrom=5Fcampaign()`:=20=20`error.detail.err?= =?UTF-8?q?or=5Fcode`=20**Changed**=20*=20`mistral.beta.observability.judg?= =?UTF-8?q?es.create()`:=20=20`error.detail.error=5Fcode`=20**Changed**=20?= =?UTF-8?q?*=20`mistral.beta.observability.datasets.import=5Ffrom=5Ffile()?= =?UTF-8?q?`:=20=20`error.detail.error=5Fcode`=20**Changed**=20*=20`mistra?= =?UTF-8?q?l.beta.observability.datasets.import=5Ffrom=5Fplayground()`:=20?= =?UTF-8?q?=20`error.detail.error=5Fcode`=20**Changed**=20*=20`mistral.bet?= =?UTF-8?q?a.observability.datasets.import=5Ffrom=5Fdataset=5Frecords()`:?= =?UTF-8?q?=20=20`error.detail.error=5Fcode`=20**Changed**=20*=20`mistral.?= =?UTF-8?q?beta.observability.datasets.export=5Fto=5Fjsonl()`:=20=20`error?= =?UTF-8?q?.detail.error=5Fcode`=20**Changed**=20*=20`mistral.beta.observa?= =?UTF-8?q?bility.datasets.fetch=5Ftask()`:=20=20`error.detail.error=5Fcod?= =?UTF-8?q?e`=20**Changed**=20*=20`mistral.beta.observability.datasets.lis?= =?UTF-8?q?t=5Ftasks()`:=20=20`error.detail.error=5Fcode`=20**Changed**=20?= =?UTF-8?q?*=20`mistral.beta.observability.datasets.records.fetch()`:=20?= =?UTF-8?q?=20`error.detail.error=5Fcode`=20**Changed**=20*=20`mistral.bet?= =?UTF-8?q?a.observability.datasets.records.delete()`:=20=20`error.detail.?= =?UTF-8?q?error=5Fcode`=20**Changed**=20*=20`mistral.beta.observability.c?= =?UTF-8?q?hat=5Fcompletion=5Fevents.fields.fetch=5Foptions()`:=20=20`erro?= =?UTF-8?q?r.detail.error=5Fcode`=20**Changed**=20*=20`mistral.beta.observ?= =?UTF-8?q?ability.chat=5Fcompletion=5Fevents.fields.list()`:=20=20`error.?= =?UTF-8?q?detail.error=5Fcode`=20**Changed**=20*=20`mistral.beta.observab?= =?UTF-8?q?ility.chat=5Fcompletion=5Fevents.judge()`:=20=20`error.detail.e?= =?UTF-8?q?rror=5Fcode`=20**Changed**=20*=20`mistral.beta.observability.ch?= =?UTF-8?q?at=5Fcompletion=5Fevents.fetch=5Fsimilar=5Fevents()`:=20=20`err?= =?UTF-8?q?or.detail.error=5Fcode`=20**Changed**=20*=20`mistral.beta.obser?= =?UTF-8?q?vability.chat=5Fcompletion=5Fevents.fetch()`:=20=20`error.detai?= =?UTF-8?q?l.error=5Fcode`=20**Changed**=20*=20`mistral.beta.observability?= =?UTF-8?q?.chat=5Fcompletion=5Fevents.search=5Fids()`:=20=20`error.detail?= =?UTF-8?q?.error=5Fcode`=20**Changed**=20*=20`mistral.beta.observability.?= =?UTF-8?q?chat=5Fcompletion=5Fevents.search()`:=20=20`error.detail.error?= =?UTF-8?q?=5Fcode`=20**Changed**=20*=20`mistral.workflows.workers.whoami(?= =?UTF-8?q?)`:=20**Removed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`mist?= =?UTF-8?q?ral.beta.observability.datasets.records.bulk=5Fdelete()`:=20=20?= =?UTF-8?q?`error.detail.error=5Fcode`=20**Changed**=20*=20`mistral.beta.o?= =?UTF-8?q?bservability.datasets.records.judge()`:=20=20`error.detail.erro?= =?UTF-8?q?r=5Fcode`=20**Changed**=20*=20`mistral.beta.observability.datas?= =?UTF-8?q?ets.records.update=5Fpayload()`:=20=20`error.detail.error=5Fcod?= =?UTF-8?q?e`=20**Changed**=20*=20`mistral.beta.observability.datasets.rec?= =?UTF-8?q?ords.update=5Fproperties()`:=20=20`error.detail.error=5Fcode`?= =?UTF-8?q?=20**Changed**?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .speakeasy/gen.lock | 350 +++++++++--------- .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/accesses.py | 18 + src/mistralai/client/agents.py | 48 ++- src/mistralai/client/basesdk.py | 15 +- src/mistralai/client/batch_jobs.py | 30 ++ src/mistralai/client/beta_agents.py | 66 ++++ src/mistralai/client/campaigns.py | 36 ++ src/mistralai/client/chat.py | 48 ++- .../client/chat_completion_events.py | 30 ++ src/mistralai/client/classifiers.py | 24 ++ src/mistralai/client/connectors.py | 48 +++ src/mistralai/client/conversations.py | 66 ++++ src/mistralai/client/datasets.py | 90 +++++ src/mistralai/client/deployments.py | 12 + src/mistralai/client/documents.py | 60 +++ src/mistralai/client/embeddings.py | 6 + src/mistralai/client/events.py | 12 + src/mistralai/client/executions.py | 84 +++++ src/mistralai/client/fields.py | 18 + src/mistralai/client/files.py | 40 +- src/mistralai/client/fim.py | 12 + src/mistralai/client/fine_tuning_jobs.py | 30 ++ src/mistralai/client/judges.py | 36 ++ src/mistralai/client/libraries.py | 30 ++ src/mistralai/client/metrics.py | 6 + 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/models_.py | 36 ++ src/mistralai/client/ocr.py | 6 + src/mistralai/client/records.py | 36 ++ src/mistralai/client/runs.py | 28 +- src/mistralai/client/schedules.py | 18 + src/mistralai/client/speech.py | 6 + src/mistralai/client/transcriptions.py | 12 + src/mistralai/client/utils/metadata.py | 1 + src/mistralai/client/utils/security.py | 31 +- src/mistralai/client/utils/serializers.py | 12 +- src/mistralai/client/voices.py | 36 ++ src/mistralai/client/workers.py | 162 -------- src/mistralai/client/workflows.py | 83 ++++- src/mistralai/client/workflows_events.py | 12 + 87 files changed, 1842 insertions(+), 671 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..b41efcba 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: 129b5c46915a7e2057badc215ab11c56 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.3.0 + configChecksum: 23f8bedccc0eae8d219fc0f204f0d860 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: 74f4d41f-0382-4c48-87ab-5df1ec902e1e + pristine_commit_hash: 56fdf394de12e7e76b15732007d7bf57395c39c8 + pristine_tree_hash: 20584b23b139630249ea450932c4b3ff9747b77e 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,8 @@ features: nameOverrides: 3.0.3 nullables: 1.0.2 openEnums: 1.0.4 - pagination: 3.0.7 + operationTimeout: 0.3.1 + pagination: 3.0.9 responseFormat: 1.1.0 retries: 3.0.4 sdkHooks: 1.2.1 @@ -219,8 +220,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 +230,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 +250,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 +436,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 +446,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 +460,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 +470,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 +1164,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 +1240,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 +1744,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 +1984,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 +2560,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 +2650,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 +2858,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 +2920,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 +2992,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 +3004,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 +3060,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 +3076,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 +3124,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 +3178,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,80 +3212,80 @@ 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:421e56bc3992cac6dd6e90992f219ac2a798fea0 + pristine_git_object: 0a44f4d847ea627a02c57dd61fb3f5c691327131 src/mistralai/client/accesses.py: id: 76fc53bfcf59 - last_write_checksum: sha1:4b1cf5d760f690d35582f9037df44c97c11e7e14 - pristine_git_object: 2cfdc7da91be41177f62b8ac7b2fe48aba42e496 + last_write_checksum: sha1:0c417e7a0bf9dfc523dbabee816b73d7a4d52f1d + pristine_git_object: 002f0103547db5107f4646d645b11682e220b955 src/mistralai/client/agents.py: id: e946546e3eaa - last_write_checksum: sha1:bd526b7613c13f07adee931996ec7fed54e72f26 - pristine_git_object: 2e91dd04aa66e340db8fe61ee8f04abf67798eaf + last_write_checksum: sha1:169d1fa06d2adac6017c8716d377853afd278025 + pristine_git_object: f16078e86091a52de5d3e6cb5cac7262d22bd647 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 pristine_git_object: 7e36fd0d73ebeb873f74f4109896a6cf3bb7d2ba src/mistralai/client/batch_jobs.py: id: 3423fec25840 - last_write_checksum: sha1:cd6fa64476a43c23709383118c39c307acdcd64f - pristine_git_object: dc378cde31e59b39f2569e71496b9e8abf8a5056 + last_write_checksum: sha1:ae829e85bfc6194483f8fa2185e8634806a9cb58 + pristine_git_object: 9c6fd9c268e0d242c63277812bd0b0224ac61475 src/mistralai/client/beta.py: id: 981417f45147 last_write_checksum: sha1:0971bda6a9024dcbdf8b4aaad1086417b01ee40f pristine_git_object: 83b8fc8792469efbd03f0bab240d4a6dc8135db5 src/mistralai/client/beta_agents.py: id: b64ad29b7174 - last_write_checksum: sha1:4ef1760cf665e0349b830e811dd15e8ac84ca31c - pristine_git_object: 00a0a1975533553fd9d5313afc533a67bf5c4643 + last_write_checksum: sha1:7b5b7ca9dd622067ee3da020687579d7974754c9 + pristine_git_object: 5d60170e267f453aa4c2db7c6b2d48f7b4c69366 src/mistralai/client/campaigns.py: id: 9e64fcf4e60e - last_write_checksum: sha1:0139096765ca8b44ef209ee0fc62e72040f3a6ff - pristine_git_object: a1ffcebc7c98a3c889ccace55c9a6c9cf3ff28df + last_write_checksum: sha1:5fb00fbd6551d63a545e3a28a4e8d55ea5d49daf + pristine_git_object: 427bef5e086a425aaa14381aba53085681029f3e src/mistralai/client/chat.py: id: 7eba0f088d47 - last_write_checksum: sha1:dced89ea82a30a61e0c62db2f2a0c3be8a7ba099 - pristine_git_object: c11a53d1237c284ff74b5aba791bd405bac2d0ff + last_write_checksum: sha1:5e8b0d17268471e3b914358c1477bd1ca43357e5 + pristine_git_object: cfc615eb0e529539f74cb69049ef7ff3fcc9d8d5 src/mistralai/client/chat_completion_events.py: id: 1813f339625b - last_write_checksum: sha1:cde21c8338e4fd60143fdc6ca361c0c42ec54775 - pristine_git_object: c060235c2c673b41c5fe0d1c8ac3a5c2a3d44e62 + last_write_checksum: sha1:1e7ed51f7ad879b3cd903d66e52716717142e4a8 + pristine_git_object: 9d00fe4f80b3cb63828aa028b74033b2e47600df src/mistralai/client/classifiers.py: id: 26e773725732 - last_write_checksum: sha1:ee94a4e50cda893f9c19c2304adda8b23fc2de9e - pristine_git_object: 67199b601e38dff6fc6a4317eb845fbde6c25de0 + last_write_checksum: sha1:733bff8a462ff4190ff4c2aeb963ff153ba1ea79 + pristine_git_object: 9fd3b3a1b28b155ee397a6edb6da106408c3bade src/mistralai/client/connectors.py: id: 39da03126050 - last_write_checksum: sha1:61a434ec297f20aea468fe6c34cca60ad5f36bec - pristine_git_object: 238f927703af44c9449a1d0ae90eefedbfc43c12 + last_write_checksum: sha1:78489e58ca183c5db5e7c0efaf3351cf104aa452 + pristine_git_object: fc9d6319b4d321e21a7b7d73515f9d13b9ac8a2a src/mistralai/client/conversations.py: id: 40692a878064 - last_write_checksum: sha1:f5f2e6d1d78b75177d6b831b69b212956926eede - pristine_git_object: 9aeb5b559a02f43004b8f93701c9adfbeab3d608 + last_write_checksum: sha1:b975766d73e0c407ae43bd79c52fa604233fbb73 + pristine_git_object: 49810eb612208745b2a2cf26fc8419245f86520b src/mistralai/client/datasets.py: id: e5a6ae2a2d85 - last_write_checksum: sha1:2483bd56b90599039573c2c152dcbffa8ba8b3b8 - pristine_git_object: 48ecbdd8c1b2f42fa77a033aa0e4b4f49d20f088 + last_write_checksum: sha1:52f8dc6df7430622882b02e8d01d8da02e4e998f + pristine_git_object: f9a8dec3fe679e1f1bde07dd6a93a3af8b5c3732 src/mistralai/client/deployments.py: id: a874b267fcb9 - last_write_checksum: sha1:0ef6db65bcea6d41d204d925281ad0ba6763263f - pristine_git_object: a428c61cff07e1d789ec9dfca2a795b2ab4c544a + last_write_checksum: sha1:ed90412267891097432b4a988cd6113d35530c9b + pristine_git_object: 6613b91c79b3aaa7e3a43fe815b2e018167e47e3 src/mistralai/client/documents.py: id: bcc17286c31c - last_write_checksum: sha1:29e7edd6f45d8a1a7ec8e9c9734bebe56ff97e7e - pristine_git_object: 95ea432390fcf4c8c07b3e99c7c1f5776007ce10 + last_write_checksum: sha1:88e164a0a1fc0608c42ad77864b43b788a25cd2c + pristine_git_object: 701e53108423fdf17db03fbf52c76a880af37d7e src/mistralai/client/embeddings.py: id: f9c17258207e - last_write_checksum: sha1:d1610bf12dba8b2f8cb27d2f0aa592594dfe6b3a - pristine_git_object: 5d55ffc43c0c98d46e04b238ab23a08d1b9e6a6a + last_write_checksum: sha1:3766f5877ce2bb2069e0881b4f4c22b4beb7b8d6 + pristine_git_object: a8a15363d4daeeae90186a74685ed76d440b481f src/mistralai/client/errors/__init__.py: id: 0b2db51246df last_write_checksum: sha1:0032f4eb3501c71fafb8f68113a8c80e677311a4 @@ -3311,52 +3316,52 @@ trackedFiles: pristine_git_object: 25b87255a51021079f8ba5cc60b43509e12f9a4d src/mistralai/client/events.py: id: ac9b961cc70d - last_write_checksum: sha1:8ec0c8993e2d8839f9b83b0674ad83866308593f - pristine_git_object: c57ad094c6e521448ae299fcb2184acc466d99a4 + last_write_checksum: sha1:6a2146acbeee59ba5f3b20dc87cde247b25ec04a + pristine_git_object: db3ebcf5f9830ebbdf7c055104aadc7677a73710 src/mistralai/client/executions.py: id: 974004d347a2 - last_write_checksum: sha1:fe54e0d46152727ceec431d06c2d635f8ce6ff9b - pristine_git_object: 66ec396bfc42e67aff34e2b6d986452168339a01 + last_write_checksum: sha1:af39569f54368dfd89eb74e6ff6d00e75155c06a + pristine_git_object: 4e6291f40a44f69f8d49a775cc4918770c8fe744 src/mistralai/client/fields.py: id: 862335210b20 - last_write_checksum: sha1:789ac221e3aec61d0d31abd1761e368e383fba88 - pristine_git_object: a5b8003ca5fc766a7db89d6c95b9d0e42952af86 + last_write_checksum: sha1:af527d7976d092d01437a584fc692c07fd1e5f6d + pristine_git_object: 1ac05dc5281541da93cabcc8bbb4caac9090dad2 src/mistralai/client/files.py: id: f12df4b2ce43 - last_write_checksum: sha1:e60cfc2841ef8888a6a52479adf76ec32ecae6ac - pristine_git_object: a843cb7b2b1b55ba20093c4d43faddb972d8f645 + last_write_checksum: sha1:a09a667a20e56ab900500a00f7f8fc329219b49c + pristine_git_object: 0728e9a29b1703ec98c2e7c9d2984b30c51757fc src/mistralai/client/fim.py: id: 217bea5d701d - last_write_checksum: sha1:dc427c9e954dfb9a7fe2df8b5c544877a28cdc73 - pristine_git_object: 8ffb7730a03398322dfdd6c83724096d4924c5c5 + last_write_checksum: sha1:e891b3dd75c481e6692b0223390cc8b914bfcf28 + pristine_git_object: b4253ad61578202a83ccbf90f33249370d9432fb src/mistralai/client/fine_tuning.py: id: 5d5079bbd54e last_write_checksum: sha1:fe1f774df4436cc9c2e54ed01a48db573eb813cd pristine_git_object: df6bc5643a13294ddfbeecc6ae84d00cd7199bed src/mistralai/client/fine_tuning_jobs.py: id: fa1ea246e0b2 - last_write_checksum: sha1:8cbf3827f5c2e43170192de39be498af0bf24cf0 - pristine_git_object: c2ee871bb1ccf7e3e24081121a7e54f1483eee5c + last_write_checksum: sha1:be61b90560da5c1b4ff57b922e0e65484fe9c00b + pristine_git_object: f13c8f2ddc0c5476923027db309324213a447a28 src/mistralai/client/httpclient.py: id: 3e46bde74327 last_write_checksum: sha1:0f4ecc805be1dc3d6e0ca090f0feb7d988f6eb9d pristine_git_object: 544af7f87d6b7097935290bebd08e30e5f485672 src/mistralai/client/judges.py: id: b6024a41ecb4 - last_write_checksum: sha1:4179fabb26ef8b8a9af00a95672f39d6ea87073e - pristine_git_object: b0eb1ea0965f63efb681d8364ac456b96f1e3983 + last_write_checksum: sha1:f79c7d8e28e343cd699cf36a6d53165cc54d8da2 + pristine_git_object: 210a147a86956d2da0d2e80d51d37bf4fa3bafd4 src/mistralai/client/libraries.py: id: d43a5f78045f - last_write_checksum: sha1:d4bde8bbd8ec4200c119e2c27a2e1f5eb32741ef - pristine_git_object: 84624c4dae3b51b1a58537f54bb05902e1edea8c + last_write_checksum: sha1:2c86ed3940b6e4841807d6b36e67fecd1bb44525 + pristine_git_object: 053cb65df029ea9899e0b565dec6e34e3525b3e0 src/mistralai/client/metrics.py: id: 937cb03f8130 - last_write_checksum: sha1:f218d4230e66e0aebe25291bba5d76df2ce78d5d - pristine_git_object: 3df1ca56638d59e5a8bd36fd762e49fd1c5df7b9 + last_write_checksum: sha1:0f650d881a321f34f03cf53d841bdb422516d699 + pristine_git_object: 8c132926e570f913fe57f77d2e8971732464c863 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 +3496,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 +3632,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 +4164,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 +4224,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 +4668,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 +4860,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 +5300,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 +5362,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 +5542,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 +5604,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 +5672,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 +5684,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 @@ -5739,32 +5736,32 @@ trackedFiles: pristine_git_object: 7f469007b8ceb86f2d4faa09d3335ac874a6fe24 src/mistralai/client/models_.py: id: 1d277958a843 - last_write_checksum: sha1:f68fc105aca375b135a00026dbbec818cd55cd73 - pristine_git_object: 7bb6dc1de1309509b5b49e743d5b5ac80cf976f3 + last_write_checksum: sha1:4247baa39847450e7d4d42678b6199dc83e9f057 + pristine_git_object: 1e96448537301468be159bd870d6d01d4928dfd8 src/mistralai/client/observability.py: id: 453a1d06d130 last_write_checksum: sha1:62d4d03a08807271b404a8684b1153a739d70b05 pristine_git_object: 4057909ebc43fc419396582fd69e62ca5135ecb3 src/mistralai/client/ocr.py: id: 2f804a12fc62 - last_write_checksum: sha1:707d91582149e76a3109df8b1a58bfd44111a93d - pristine_git_object: a46119d1577036be57896a7ea3737ab508497e4f + last_write_checksum: sha1:363a9a3de3358200ac1d8d8eb35cdff633c34da8 + pristine_git_object: be0cdfad42069f535bca52e4568ea0ea26c5af93 src/mistralai/client/py.typed: id: d95cd1565e33 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 src/mistralai/client/records.py: id: 10f90c990bd8 - last_write_checksum: sha1:47018c027eb2c9d9235f399b939073e396bd52ad - pristine_git_object: ceb8de4fe3edfbd818f6002381c365ea8437ac2c + last_write_checksum: sha1:e4d0a85b402c59788843296276dd516b07311d3b + pristine_git_object: a47d12c36d50f3b8cd0e56d840e1394647f887ba src/mistralai/client/runs.py: id: 4297d58aeb21 - last_write_checksum: sha1:a93e99bb1a5e8ba9afbe9a5dd6869c1a5f45c7b8 - pristine_git_object: 3e875ba8927d9b2e1829bbaa2ebeeb006696509e + last_write_checksum: sha1:4dfcc99df0f9951dbebedb7d124096d04f05fed2 + pristine_git_object: 08394802d34bba34d8fcd25285a8a77b5a1b285f src/mistralai/client/schedules.py: id: d3b4fe452390 - last_write_checksum: sha1:74a1455c5ba17253d2e878f638b7314edca66e21 - pristine_git_object: d6f2e5ff1a4c985acc48e1ea540537fbcf4bf92d + last_write_checksum: sha1:029d95bc3440ffd3b03a89fd045283d7ddab19a8 + pristine_git_object: d036900982e6db67d9d3f79f4e906541a1af0179 src/mistralai/client/sdk.py: id: 48edbcb38d7e last_write_checksum: sha1:a606046063cd946633918efa1662846c987c9b7e @@ -5775,12 +5772,12 @@ trackedFiles: pristine_git_object: 712e92e05c7fd3016431ec62ecb7b7789c8b7071 src/mistralai/client/speech.py: id: 5c1f1109aa5e - last_write_checksum: sha1:22b38977bf8e1f53219a2146b15f471ad1ebf4f7 - pristine_git_object: fe57e2fa80ced90774b9ea60199e138ce781c9a3 + last_write_checksum: sha1:5c4164ac1ab12f0808440110abe268921576833f + pristine_git_object: 4c3aafd507c086a0b6388834276c9510d3ed0f49 src/mistralai/client/transcriptions.py: id: 75b45780c978 - last_write_checksum: sha1:27a5b7dd6ed47b0f79b95fbb8599d439512ef344 - pristine_git_object: 7f01917d6e462cff9af75e70d32afbcc5958c7de + last_write_checksum: sha1:e333611029fccbd1fb66f7a1e96025c9311bc5b5 + pristine_git_object: d6489bf302d1d0edbc02466418444a9a4d5fec63 src/mistralai/client/types/__init__.py: id: 000b943f821c last_write_checksum: sha1:12a4ace69cbc63f1125eeddf901afed7cdf378b0 @@ -5827,8 +5824,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 +5840,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 @@ -5867,20 +5864,16 @@ trackedFiles: pristine_git_object: 2469a9f310a37a7170b54853715274f13d38901c src/mistralai/client/voices.py: 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 + last_write_checksum: sha1:c46a418a865955ab8b72d7d2584ba9b758f75165 + pristine_git_object: c4f1a71e1da1cb4ebda3ef4fb69cbbe98370d2ae src/mistralai/client/workflows.py: id: e2a0381191f6 - last_write_checksum: sha1:df0555b350409d103ca9715c69fab2e061d7ea41 - pristine_git_object: aae12f774608d18baf1bf5ccedd1a39363c0c29d + last_write_checksum: sha1:548758b46035b2624fd8d596e34465866701ce4d + pristine_git_object: d73da8d95d7ec6644253994641616d1121f7f023 src/mistralai/client/workflows_events.py: id: 6d4f674ce8ef - last_write_checksum: sha1:ee029cad739604429d7cff743f2a469cd3cd4076 - pristine_git_object: db39e37006754e212084cab34f47480e07c36bbf + last_write_checksum: sha1:79816d0388e471a4bbb3d09df84794e9405cf3b2 + pristine_git_object: 57b6f1cbff925f194f8ec6275222271c0fc5f02d examples: list_models_v1_models_get: speakeasy-default-list-models-v1-models-get: @@ -7994,7 +7987,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 +8288,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(InstructRequest).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..55eaf3cf 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.3.0 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index fff0c8c6..54a3a99c 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:81c5da3669badf36ebd872b50b44e946d9d55546c163e7973ecf7e75d0ed46b3 + sourceBlobDigest: sha256:ffca608665624fae7a884937d899788f639e36ac5b9c94d09e3acc5d6512f78a tags: - latest targets: @@ -38,13 +38,13 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:8a9e51d8532d887897d3335b416422973f6d1adb687a88dc288bfb51e1fdacdf - sourceBlobDigest: sha256:ad19d950e5564f613ce71b9b0b98eadf76609f0ff96db0e083b20c8190c718e3 + sourceRevisionDigest: sha256:81c5da3669badf36ebd872b50b44e946d9d55546c163e7973ecf7e75d0ed46b3 + sourceBlobDigest: sha256:ffca608665624fae7a884937d899788f639e36ac5b9c94d09e3acc5d6512f78a 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..bd0050f9 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 12:19:06 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.1 (2.879.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.3.0] . +### Releases +- [PyPI v2.3.0] https://pypi.org/project/mistralai/2.3.0 - . \ 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..0a44f4d8 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.3.0" __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.3.0 2.879.6 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/accesses.py b/src/mistralai/client/accesses.py index 2cfdc7da..002f0103 100644 --- a/src/mistralai/client/accesses.py +++ b/src/mistralai/client/accesses.py @@ -37,6 +37,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -127,6 +130,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -225,6 +231,9 @@ def update_or_create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -332,6 +341,9 @@ async def update_or_create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -437,6 +449,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -541,6 +556,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/agents.py b/src/mistralai/client/agents.py index 2e91dd04..f16078e8 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[ @@ -90,6 +93,9 @@ def complete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -107,7 +113,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 +216,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[ @@ -263,6 +274,9 @@ async def complete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -280,7 +294,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 +397,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[ @@ -438,6 +457,9 @@ def stream( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -455,7 +477,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 +588,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[ @@ -621,6 +648,9 @@ async def stream_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -638,7 +668,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/batch_jobs.py b/src/mistralai/client/batch_jobs.py index dc378cde..9c6fd9c2 100644 --- a/src/mistralai/client/batch_jobs.py +++ b/src/mistralai/client/batch_jobs.py @@ -52,6 +52,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -160,6 +163,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -266,6 +272,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -375,6 +384,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -475,6 +487,9 @@ def get( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -565,6 +580,9 @@ async def get_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -650,6 +668,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -734,6 +755,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -818,6 +842,9 @@ def cancel( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -902,6 +929,9 @@ async def cancel_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/beta_agents.py b/src/mistralai/client/beta_agents.py index 00a0a197..5d60170e 100644 --- a/src/mistralai/client/beta_agents.py +++ b/src/mistralai/client/beta_agents.py @@ -66,6 +66,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -205,6 +208,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -329,6 +335,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -440,6 +449,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -544,6 +556,9 @@ def get( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -642,6 +657,9 @@ async def get_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -766,6 +784,9 @@ def update( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -917,6 +938,9 @@ async def update_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1033,6 +1057,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1121,6 +1148,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1213,6 +1243,9 @@ def update_version( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1306,6 +1339,9 @@ async def update_version_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1401,6 +1437,9 @@ def list_versions( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1497,6 +1536,9 @@ async def list_versions_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1591,6 +1633,9 @@ def get_version( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1684,6 +1729,9 @@ async def get_version_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1779,6 +1827,9 @@ def create_version_alias( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1875,6 +1926,9 @@ async def create_version_alias_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1967,6 +2021,9 @@ def list_version_aliases( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2057,6 +2114,9 @@ async def list_version_aliases_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2149,6 +2209,9 @@ def delete_version_alias( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2242,6 +2305,9 @@ async def delete_version_alias_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/campaigns.py b/src/mistralai/client/campaigns.py index a1ffcebc..427bef5e 100644 --- a/src/mistralai/client/campaigns.py +++ b/src/mistralai/client/campaigns.py @@ -41,6 +41,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -146,6 +149,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -247,6 +253,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -343,6 +352,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -435,6 +447,9 @@ def fetch( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -525,6 +540,9 @@ async def fetch_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -615,6 +633,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -705,6 +726,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -795,6 +819,9 @@ def fetch_status( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -885,6 +912,9 @@ async def fetch_status_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -979,6 +1009,9 @@ def list_events( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1077,6 +1110,9 @@ async def list_events_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/chat.py b/src/mistralai/client/chat.py index c11a53d1..cfc615eb 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[ @@ -181,6 +184,9 @@ def complete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -201,7 +207,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 +312,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[ @@ -363,6 +374,9 @@ async def complete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -383,7 +397,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 +502,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[ @@ -547,6 +566,9 @@ def stream( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -567,7 +589,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 +702,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[ @@ -739,6 +766,9 @@ async def stream_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -759,7 +789,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/chat_completion_events.py b/src/mistralai/client/chat_completion_events.py index c060235c..9d00fe4f 100644 --- a/src/mistralai/client/chat_completion_events.py +++ b/src/mistralai/client/chat_completion_events.py @@ -53,6 +53,9 @@ def search( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -165,6 +168,9 @@ async def search_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -273,6 +279,9 @@ def search_ids( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -375,6 +384,9 @@ async def search_ids_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -475,6 +487,9 @@ def fetch( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -565,6 +580,9 @@ async def fetch_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -655,6 +673,9 @@ def fetch_similar_events( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -747,6 +768,9 @@ async def fetch_similar_events_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -843,6 +867,9 @@ def judge( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -949,6 +976,9 @@ async def judge_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/classifiers.py b/src/mistralai/client/classifiers.py index 67199b60..9fd3b3a1 100644 --- a/src/mistralai/client/classifiers.py +++ b/src/mistralai/client/classifiers.py @@ -42,6 +42,9 @@ def moderate( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -142,6 +145,9 @@ async def moderate_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -240,6 +246,9 @@ def moderate_chat( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -339,6 +348,9 @@ async def moderate_chat_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -440,6 +452,9 @@ def classify( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -540,6 +555,9 @@ async def classify_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -635,6 +653,9 @@ def classify_chat( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -729,6 +750,9 @@ async def classify_chat_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/connectors.py b/src/mistralai/client/connectors.py index 238f9277..fc9d6319 100644 --- a/src/mistralai/client/connectors.py +++ b/src/mistralai/client/connectors.py @@ -53,6 +53,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -171,6 +174,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -279,6 +285,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -379,6 +388,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -475,6 +487,9 @@ def get_auth_url( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -568,6 +583,9 @@ async def get_auth_url_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -665,6 +683,9 @@ def call_tool( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -773,6 +794,9 @@ async def call_tool_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -883,6 +907,9 @@ def list_tools( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -987,6 +1014,9 @@ async def list_tools_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1087,6 +1117,9 @@ def get( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1183,6 +1216,9 @@ async def get_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1295,6 +1331,9 @@ def update( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1425,6 +1464,9 @@ async def update_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1535,6 +1577,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1625,6 +1670,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/conversations.py b/src/mistralai/client/conversations.py index 9aeb5b55..49810eb6 100644 --- a/src/mistralai/client/conversations.py +++ b/src/mistralai/client/conversations.py @@ -291,6 +291,9 @@ def start( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -446,6 +449,9 @@ async def start_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -563,6 +569,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -661,6 +670,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -755,6 +767,9 @@ def get( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -845,6 +860,9 @@ async def get_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -935,6 +953,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1025,6 +1046,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1136,6 +1160,9 @@ def append( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1268,6 +1295,9 @@ async def append_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1379,6 +1409,9 @@ def get_history( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1469,6 +1502,9 @@ async def get_history_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1559,6 +1595,9 @@ def get_messages( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1649,6 +1688,9 @@ async def get_messages_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1770,6 +1812,9 @@ def restart( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1916,6 +1961,9 @@ async def restart_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2073,6 +2121,9 @@ def start_stream( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2235,6 +2286,9 @@ async def start_stream_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2376,6 +2430,9 @@ def append_stream( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2515,6 +2572,9 @@ async def append_stream_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2664,6 +2724,9 @@ def restart_stream( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2817,6 +2880,9 @@ async def restart_stream_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/datasets.py b/src/mistralai/client/datasets.py index 48ecbdd8..f9a8dec3 100644 --- a/src/mistralai/client/datasets.py +++ b/src/mistralai/client/datasets.py @@ -49,6 +49,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -145,6 +148,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -243,6 +249,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -339,6 +348,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -431,6 +443,9 @@ def fetch( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -521,6 +536,9 @@ async def fetch_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -611,6 +629,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -701,6 +722,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -795,6 +819,9 @@ def update( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -900,6 +927,9 @@ async def update_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1005,6 +1035,9 @@ def list_records( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1103,6 +1136,9 @@ async def list_records_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1201,6 +1237,9 @@ def create_record( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1306,6 +1345,9 @@ async def create_record_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1409,6 +1451,9 @@ def import_from_campaign( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1511,6 +1556,9 @@ async def import_from_campaign_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1613,6 +1661,9 @@ def import_from_explorer( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1715,6 +1766,9 @@ async def import_from_explorer_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1817,6 +1871,9 @@ def import_from_file( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1919,6 +1976,9 @@ async def import_from_file_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2021,6 +2081,9 @@ def import_from_playground( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2123,6 +2186,9 @@ async def import_from_playground_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2225,6 +2291,9 @@ def import_from_dataset_records( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2327,6 +2396,9 @@ async def import_from_dataset_records_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2427,6 +2499,9 @@ def export_to_jsonl( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2517,6 +2592,9 @@ async def export_to_jsonl_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2609,6 +2687,9 @@ def fetch_task( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2702,6 +2783,9 @@ async def fetch_task_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2797,6 +2881,9 @@ def list_tasks( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2897,6 +2984,9 @@ async def list_tasks_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/deployments.py b/src/mistralai/client/deployments.py index a428c61c..6613b91c 100644 --- a/src/mistralai/client/deployments.py +++ b/src/mistralai/client/deployments.py @@ -35,6 +35,9 @@ def list_deployments( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -126,6 +129,9 @@ async def list_deployments_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -215,6 +221,9 @@ def get_deployment( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -303,6 +312,9 @@ async def get_deployment_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/documents.py b/src/mistralai/client/documents.py index 95ea4323..701e5310 100644 --- a/src/mistralai/client/documents.py +++ b/src/mistralai/client/documents.py @@ -49,6 +49,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -157,6 +160,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -263,6 +269,9 @@ def upload( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -369,6 +378,9 @@ async def upload_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -467,6 +479,9 @@ def get( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -560,6 +575,9 @@ async def get_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -659,6 +677,9 @@ def update( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -769,6 +790,9 @@ async def update_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -873,6 +897,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -966,6 +993,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1059,6 +1089,9 @@ def text_content( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1152,6 +1185,9 @@ async def text_content_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1245,6 +1281,9 @@ def status( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1338,6 +1377,9 @@ async def status_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1431,6 +1473,9 @@ def get_signed_url( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1524,6 +1569,9 @@ async def get_signed_url_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1617,6 +1665,9 @@ def extracted_text_signed_url( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1710,6 +1761,9 @@ async def extracted_text_signed_url_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1803,6 +1857,9 @@ def reprocess( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1896,6 +1953,9 @@ async def reprocess_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/embeddings.py b/src/mistralai/client/embeddings.py index 5d55ffc4..a8a15363 100644 --- a/src/mistralai/client/embeddings.py +++ b/src/mistralai/client/embeddings.py @@ -49,6 +49,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -159,6 +162,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/events.py b/src/mistralai/client/events.py index c57ad094..db3ebcf5 100644 --- a/src/mistralai/client/events.py +++ b/src/mistralai/client/events.py @@ -57,6 +57,9 @@ def get_stream_events( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -190,6 +193,9 @@ async def get_stream_events_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -307,6 +313,9 @@ def get_workflow_events( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -407,6 +416,9 @@ async def get_workflow_events_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/executions.py b/src/mistralai/client/executions.py index 66ec396b..4e6291f4 100644 --- a/src/mistralai/client/executions.py +++ b/src/mistralai/client/executions.py @@ -33,6 +33,9 @@ def get_workflow_execution( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -121,6 +124,9 @@ async def get_workflow_execution_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -211,6 +217,9 @@ def get_workflow_execution_history( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -302,6 +311,9 @@ async def get_workflow_execution_history_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -400,6 +412,9 @@ def signal_workflow_execution( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -510,6 +525,9 @@ async def signal_workflow_execution_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -620,6 +638,9 @@ def query_workflow_execution( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -730,6 +751,9 @@ async def query_workflow_execution_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -831,6 +855,9 @@ def terminate_workflow_execution( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -919,6 +946,9 @@ async def terminate_workflow_execution_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1007,6 +1037,9 @@ def batch_terminate_workflow_executions( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1098,6 +1131,9 @@ async def batch_terminate_workflow_executions_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1189,6 +1225,9 @@ def cancel_workflow_execution( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1277,6 +1316,9 @@ async def cancel_workflow_execution_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1365,6 +1407,9 @@ def batch_cancel_workflow_executions( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1456,6 +1501,9 @@ async def batch_cancel_workflow_executions_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1555,6 +1603,9 @@ def reset_workflow( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1664,6 +1715,9 @@ async def reset_workflow_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1774,6 +1828,9 @@ def update_workflow_execution( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1884,6 +1941,9 @@ async def update_workflow_execution_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1985,6 +2045,9 @@ def get_workflow_execution_trace_otel( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2075,6 +2138,9 @@ async def get_workflow_execution_trace_otel_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2165,6 +2231,9 @@ def get_workflow_execution_trace_summary( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2255,6 +2324,9 @@ async def get_workflow_execution_trace_summary_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2349,6 +2421,9 @@ def get_workflow_execution_trace_events( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2445,6 +2520,9 @@ async def get_workflow_execution_trace_events_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2543,6 +2621,9 @@ def stream( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2650,6 +2731,9 @@ async def stream_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/fields.py b/src/mistralai/client/fields.py index a5b8003c..1ac05dc5 100644 --- a/src/mistralai/client/fields.py +++ b/src/mistralai/client/fields.py @@ -31,6 +31,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -116,6 +119,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -205,6 +211,9 @@ def fetch_options( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -300,6 +309,9 @@ async def fetch_options_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -397,6 +409,9 @@ def fetch_option_counts( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -505,6 +520,9 @@ async def fetch_option_counts_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/files.py b/src/mistralai/client/files.py index a843cb7b..0728e9a2 100644 --- a/src/mistralai/client/files.py +++ b/src/mistralai/client/files.py @@ -58,6 +58,9 @@ def upload( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -168,6 +171,9 @@ async def upload_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -272,6 +278,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -377,6 +386,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -468,6 +480,9 @@ def retrieve( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -552,6 +567,9 @@ async def retrieve_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -636,6 +654,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -720,6 +741,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -804,6 +828,9 @@ def download( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -890,6 +917,9 @@ async def download_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -965,7 +995,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 @@ -976,6 +1006,9 @@ def get_signed_url( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1050,7 +1083,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 @@ -1061,6 +1094,9 @@ async def get_signed_url_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/fim.py b/src/mistralai/client/fim.py index 8ffb7730..b4253ad6 100644 --- a/src/mistralai/client/fim.py +++ b/src/mistralai/client/fim.py @@ -62,6 +62,9 @@ def complete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -190,6 +193,9 @@ async def complete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -318,6 +324,9 @@ def stream( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -454,6 +463,9 @@ async def stream_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/fine_tuning_jobs.py b/src/mistralai/client/fine_tuning_jobs.py index c2ee871b..f13c8f2d 100644 --- a/src/mistralai/client/fine_tuning_jobs.py +++ b/src/mistralai/client/fine_tuning_jobs.py @@ -56,6 +56,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -169,6 +172,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -296,6 +302,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -441,6 +450,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -552,6 +564,9 @@ def get( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -638,6 +653,9 @@ async def get_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -724,6 +742,9 @@ def cancel( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -810,6 +831,9 @@ async def cancel_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -896,6 +920,9 @@ def start( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -982,6 +1009,9 @@ async def start_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/judges.py b/src/mistralai/client/judges.py index b0eb1ea0..210a147a 100644 --- a/src/mistralai/client/judges.py +++ b/src/mistralai/client/judges.py @@ -45,6 +45,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -155,6 +158,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -261,6 +267,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -363,6 +372,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -457,6 +469,9 @@ def fetch( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -547,6 +562,9 @@ async def fetch_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -637,6 +655,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -727,6 +748,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -831,6 +855,9 @@ def update( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -952,6 +979,9 @@ async def update_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1063,6 +1093,9 @@ def judge_conversation( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1170,6 +1203,9 @@ async def judge_conversation_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/libraries.py b/src/mistralai/client/libraries.py index 84624c4d..053cb65d 100644 --- a/src/mistralai/client/libraries.py +++ b/src/mistralai/client/libraries.py @@ -58,6 +58,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -151,6 +154,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -246,6 +252,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -345,6 +354,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -440,6 +452,9 @@ def get( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -530,6 +545,9 @@ async def get_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -620,6 +638,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -710,6 +731,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -804,6 +828,9 @@ def update( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -909,6 +936,9 @@ async def update_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/metrics.py b/src/mistralai/client/metrics.py index 3df1ca56..8c132926 100644 --- a/src/mistralai/client/metrics.py +++ b/src/mistralai/client/metrics.py @@ -59,6 +59,9 @@ def get_workflow_metrics( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -174,6 +177,9 @@ async def get_workflow_metrics_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: 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/models_.py b/src/mistralai/client/models_.py index 7bb6dc1d..1e964485 100644 --- a/src/mistralai/client/models_.py +++ b/src/mistralai/client/models_.py @@ -39,6 +39,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -132,6 +135,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -223,6 +229,9 @@ def retrieve( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -315,6 +324,9 @@ async def retrieve_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -407,6 +419,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -497,6 +512,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -591,6 +609,9 @@ def update( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -692,6 +713,9 @@ async def update_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -789,6 +813,9 @@ def archive( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -873,6 +900,9 @@ async def archive_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -957,6 +987,9 @@ def unarchive( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1041,6 +1074,9 @@ async def unarchive_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/ocr.py b/src/mistralai/client/ocr.py index a46119d1..be0cdfad 100644 --- a/src/mistralai/client/ocr.py +++ b/src/mistralai/client/ocr.py @@ -63,6 +63,9 @@ def process( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -198,6 +201,9 @@ async def process_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/records.py b/src/mistralai/client/records.py index ceb8de4f..a47d12c3 100644 --- a/src/mistralai/client/records.py +++ b/src/mistralai/client/records.py @@ -33,6 +33,9 @@ def fetch( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -123,6 +126,9 @@ async def fetch_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -213,6 +219,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -303,6 +312,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -393,6 +405,9 @@ def bulk_delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -486,6 +501,9 @@ async def bulk_delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -583,6 +601,9 @@ def judge( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -689,6 +710,9 @@ async def judge_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -793,6 +817,9 @@ def update_payload( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -895,6 +922,9 @@ async def update_payload_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -997,6 +1027,9 @@ def update_properties( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1099,6 +1132,9 @@ async def update_properties_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/runs.py b/src/mistralai/client/runs.py index 3e875ba8..08394802 100644 --- a/src/mistralai/client/runs.py +++ b/src/mistralai/client/runs.py @@ -47,6 +47,9 @@ def list_runs( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -114,7 +117,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 +128,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 @@ -184,6 +190,9 @@ async def list_runs_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -256,7 +265,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 +276,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 @@ -313,6 +325,9 @@ def get_run( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -401,6 +416,9 @@ async def get_run_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -491,6 +509,9 @@ def get_run_history( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -582,6 +603,9 @@ async def get_run_history_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/schedules.py b/src/mistralai/client/schedules.py index d6f2e5ff..d0369009 100644 --- a/src/mistralai/client/schedules.py +++ b/src/mistralai/client/schedules.py @@ -31,6 +31,9 @@ def get_schedules( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -108,6 +111,9 @@ async def get_schedules_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -204,6 +210,9 @@ def schedule_workflow( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -318,6 +327,9 @@ async def schedule_workflow_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -415,6 +427,9 @@ def unschedule_workflow( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -503,6 +518,9 @@ async def unschedule_workflow_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/speech.py b/src/mistralai/client/speech.py index fe57e2fa..4c3aafd5 100644 --- a/src/mistralai/client/speech.py +++ b/src/mistralai/client/speech.py @@ -128,6 +128,9 @@ def complete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -329,6 +332,9 @@ async def complete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/transcriptions.py b/src/mistralai/client/transcriptions.py index 7f01917d..d6489bf3 100644 --- a/src/mistralai/client/transcriptions.py +++ b/src/mistralai/client/transcriptions.py @@ -51,6 +51,9 @@ def complete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -160,6 +163,9 @@ async def complete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -269,6 +275,9 @@ def stream( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -388,6 +397,9 @@ async def stream_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: 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/voices.py b/src/mistralai/client/voices.py index 2d571857..c4f1a71e 100644 --- a/src/mistralai/client/voices.py +++ b/src/mistralai/client/voices.py @@ -39,6 +39,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -135,6 +138,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -245,6 +251,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -365,6 +374,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -467,6 +479,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -557,6 +572,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -657,6 +675,9 @@ def update( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -771,6 +792,9 @@ async def update_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -875,6 +899,9 @@ def get( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -965,6 +992,9 @@ async def get_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1055,6 +1085,9 @@ def get_sample_audio( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1145,6 +1178,9 @@ async def get_sample_audio_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: 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..d73da8d9 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 ) @@ -286,6 +283,9 @@ def get_workflows( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -354,7 +354,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 +366,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 @@ -420,6 +423,9 @@ async def get_workflows_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -493,7 +499,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 +511,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 @@ -567,6 +576,9 @@ def get_workflow_registrations( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -684,6 +696,9 @@ async def get_workflow_registrations_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -766,7 +781,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 +799,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. @@ -801,6 +816,9 @@ def execute_workflow( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -894,7 +912,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 +930,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. @@ -929,6 +947,9 @@ async def execute_workflow_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1025,7 +1046,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 +1064,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. @@ -1060,6 +1081,9 @@ def execute_workflow_registration( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1156,7 +1180,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 +1198,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. @@ -1191,6 +1215,9 @@ async def execute_workflow_registration_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1301,6 +1328,9 @@ def get_workflow( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1389,6 +1419,9 @@ async def get_workflow_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1483,6 +1516,9 @@ def update_workflow( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1589,6 +1625,9 @@ async def update_workflow_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1693,6 +1732,9 @@ def get_workflow_registration( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1789,6 +1831,9 @@ async def get_workflow_registration_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1881,6 +1926,9 @@ def archive_workflow( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1969,6 +2017,9 @@ async def archive_workflow_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2057,6 +2108,9 @@ def unarchive_workflow( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2147,6 +2201,9 @@ async def unarchive_workflow_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/workflows_events.py b/src/mistralai/client/workflows_events.py index db39e370..57b6f1cb 100644 --- a/src/mistralai/client/workflows_events.py +++ b/src/mistralai/client/workflows_events.py @@ -57,6 +57,9 @@ def get_stream_events( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -190,6 +193,9 @@ async def get_stream_events_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -307,6 +313,9 @@ def get_workflow_events( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -407,6 +416,9 @@ async def get_workflow_events_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: From b551d9a4bcd51755ed23a13fda9e2391b7ff1f1b Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 3 Apr 2026 12:22:02 +0000 Subject: [PATCH 2/4] chore: align pyproject.toml and uv.lock to version 2.3.0 --- pyproject.toml | 2 +- uv.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 54d2b372..358a1336 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.2.0" +version = "2.3.0" 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..3175b2ac 100644 --- a/uv.lock +++ b/uv.lock @@ -560,7 +560,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.2.0" +version = "2.3.0" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 391e7929d7e109308a56a939ad6d8c9d3b1b42dd Mon Sep 17 00:00:00 2001 From: Antoine Hoorelbeke Date: Thu, 2 Apr 2026 14:02:26 +0200 Subject: [PATCH 3/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 d73da8d9..cd34603a 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 From bfd079de47504055d8d3543b748883763ef9d727 Mon Sep 17 00:00:00 2001 From: Antoine Hoorelbeke Date: Fri, 3 Apr 2026 14:26:18 +0200 Subject: [PATCH 4/4] fix(mypy): changed type hinting of tools --- examples/mistral/chat/function_calling.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/mistral/chat/function_calling.py b/examples/mistral/chat/function_calling.py index 68e9d91c..318e4e24 100644 --- a/examples/mistral/chat/function_calling.py +++ b/examples/mistral/chat/function_calling.py @@ -12,6 +12,7 @@ ToolMessage, UserMessage, ) +from mistralai.client.models.chatcompletionrequest import ChatCompletionRequestTool # Assuming we have the following data data: dict[str, list[Any]] = { @@ -48,7 +49,7 @@ def retrieve_payment_date(data: dict[str, list[Any]], transaction_id: str) -> st "retrieve_payment_date": functools.partial(retrieve_payment_date, data=data), } -tools: list[Tool] = [ +tools: list[ChatCompletionRequestTool] = [ Tool( function=Function( name="retrieve_payment_status",