From 7636935b4b9c02587bcc591a9c435d62dfc3892f Mon Sep 17 00:00:00 2001 From: Buildkite CI Date: Tue, 24 Nov 2026 14:43:30 +0000 Subject: [PATCH] chore: sync generated SDK from upstream Generated upstream and copied here. Do not edit in this repository; changes are overwritten by the next sync. --- .speakeasy/gen.lock | 845 +++++++++--------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +- AGENTS.md | 21 + Makefile | 6 +- README-PYPI.md | 54 +- README.md | 54 +- RELEASES.md | 96 ++ USAGE.md | 4 +- docs/models/agentscompletionrequest.md | 58 +- .../agentscompletionrequesttoolchoice.md | 8 +- docs/models/agentscompletionstreamrequest.md | 58 +- ...agentscompletionstreamrequesttoolchoice.md | 8 +- docs/models/audiochunk.md | 8 +- docs/models/chatcompletionrequest.md | 64 +- .../models/chatcompletionrequesttoolchoice.md | 8 +- docs/models/chatcompletionstreamrequest.md | 64 +- .../chatcompletionstreamrequesttoolchoice.md | 8 +- docs/models/chatmoderationrequest.md | 2 +- docs/models/chatmoderationrequestinputs3.md | 2 +- docs/models/connectorerrorcode.md | 1 + docs/models/createdatasetrecordsitem.md | 11 + docs/models/createdatasetrecordsitemsource.md | 16 + docs/models/createdatasetrecordsrequest.md | 8 + docs/models/createdatasetrecordsresponse.md | 8 + ...atasetsdatasetidrecordsbulkpostrequest.md} | 4 +- docs/models/createdatasetrequest.md | 3 +- docs/models/createdeploymentarchiverequest.md | 10 + ...teingestionpipelineconfigurationrequest.md | 9 +- docs/models/createwebhook.md | 40 +- docs/models/dataset.md | 3 +- docs/models/datasetpreview.md | 3 +- .../models/deploymentarchiveuploadresponse.md | 12 + docs/models/displayformat.md | 21 + docs/models/displayspec.md | 21 + docs/models/embeddinginput.md | 23 + docs/models/embeddingrequest.md | 4 +- docs/models/embeddingrequestinputs.md | 18 + docs/models/evaluationrunrunscorev2.md | 19 + docs/models/evaluationrunv2response.md | 2 +- .../models/evaluationrunv2withrefsresponse.md | 2 +- docs/models/evaluatorv2.md | 5 +- docs/models/getdeploymentsummariesresponse.md | 8 - ...etdeploymentsummariesresponsedeployment.md | 15 - ...ntsummariesresponsedeploymentdeployment.md | 11 - ...oymentsummariesresponsedeploymentstatus.md | 18 - ...loymentsummariesresponsevespadeployment.md | 9 - ...etdeploymentsummariesresponsevespaindex.md | 10 - docs/models/goalresult.md | 9 +- .../importdatasetfromplaygroundrequest.md | 8 - .../models/ingestionpipelinetargetindexref.md | 9 - docs/models/metricdirectionspec.md | 11 + docs/models/metricdirectionspecdirection.md | 18 + docs/models/metricsdata.md | 17 - docs/models/missinggoalitem.md | 17 + docs/models/moderationrequest.md | 11 + docs/models/moderationrequestinputs.md | 19 + .../oauth2authorizationcodeauthmethod.md | 15 +- docs/models/observabilityerrorcode.md | 2 + ...indexmetrics.md => prompttokensdetails.md} | 8 +- docs/models/realtimespeechsession.md | 3 +- .../realtimespeechsessionupdatepayload.md | 15 +- ...altimetranscriptionsessionupdatepayload.md | 18 +- .../registerdeploymentrequestdeployment.md | 10 - ...erdeploymentrequestdeploymentdeployment.md | 11 - ...gisterdeploymentrequestdeploymentstatus.md | 14 - ...egisterdeploymentrequestvespadeployment.md | 11 - .../registerdeploymentrequestvespafield.md | 13 - .../registerdeploymentrequestvespaindex.md | 11 - .../registersearchindexresponseindex.md | 8 - docs/models/responseformat.md | 2 +- docs/models/scalarstatisticvalue.md | 3 +- docs/models/schemafielddatatype.md | 18 - docs/models/schemafieldindex.md | 15 - docs/models/schemafieldrankingtype.md | 20 - docs/models/schemafieldstorage.md | 14 - docs/models/scoremetric.md | 11 + docs/models/scoremetricvalue.md | 17 + docs/models/signalinvocationbody.md | 9 +- .../models/signalinvocationbodycallcontext.md | 23 + docs/models/simplenumericstatisticspec.md | 7 +- docs/models/tokenendpointauthmethod.md | 14 + docs/models/toolcall.md | 4 +- docs/models/toolchoice.md | 2 - docs/models/transcriptionstreameventsdata.md | 24 + docs/models/transcriptionstreameventtypes.md | 4 + docs/models/turndetectioneagerendevent.md | 8 +- docs/models/turndetectionendevent.md | 2 +- docs/models/turndetectionendreason.md | 4 + docs/models/turndetectionresumeevent.md | 8 +- docs/models/turndetectionstartevent.md | 8 +- ...ragdeploymentsdeploymentiddeleterequest.md | 8 - docs/models/updatedatasetrequest.md | 3 +- ...eploymentsdeploymentidmetricsputrequest.md | 9 - docs/models/updateinvocationbody.md | 9 +- .../models/updateinvocationbodycallcontext.md | 23 + ...emetricsrequestdeploymentmetricsoffline.md | 9 - ...temetricsrequestdeploymentmetricsonline.md | 10 - docs/models/usageinfo.md | 17 +- docs/models/webhook.md | 2 + docs/models/workflowexecutionrequest.md | 25 +- .../workflowexecutionrequestcallcontext.md | 23 + docs/sdks/agents/README.md | 120 +-- docs/sdks/chat/README.md | 132 +-- docs/sdks/classifiers/README.md | 15 +- docs/sdks/datasets/README.md | 26 +- docs/sdks/deployments/README.md | 44 + docs/sdks/executions/README.md | 26 +- docs/sdks/files/README.md | 2 +- .../ingestionpipelineconfigurations/README.md | 11 +- docs/sdks/ragsearchindexes/README.md | 182 ---- .../README.md | 0 docs/sdks/webhooks/README.md | 42 +- docs/sdks/workflows/README.md | 58 +- .../mistral/agents/async_conversation_run.py | 2 +- ...async_conversation_run_code_interpreter.py | 2 +- .../jobs/async_batch_job_embeddings_typed.py | 8 +- examples/mistral/jobs/async_files.py | 8 +- examples/mistral/jobs/files.py | 8 +- packages/azure/pyproject.toml | 3 - packages/gcp/pyproject.toml | 3 - pyproject.toml | 5 +- .../client/_hooks/workflow_encoding_hook.py | 16 +- src/mistralai/client/_version.py | 4 +- src/mistralai/client/agents.py | 8 +- src/mistralai/client/beta_context.py | 6 +- src/mistralai/client/chat.py | 8 +- src/mistralai/client/classifiers.py | 32 +- src/mistralai/client/datasets.py | 130 +-- src/mistralai/client/deployments.py | 204 +++++ src/mistralai/client/embeddings.py | 4 +- src/mistralai/client/executions.py | 46 +- .../ingestion_pipeline_configurations.py | 24 +- src/mistralai/client/models/__init__.py | 317 +++---- .../client/models/agentscompletionrequest.py | 4 +- .../models/agentscompletionstreamrequest.py | 4 +- src/mistralai/client/models/audiochunk.py | 37 +- .../client/models/chatcompletionrequest.py | 4 +- .../models/chatcompletionstreamrequest.py | 4 +- .../client/models/chatmoderationrequest.py | 8 +- .../client/models/connectorerrorcode.py | 1 + ...atasets_dataset_id_records_bulk_postop.py} | 16 +- .../client/models/createdatasetrecordsitem.py | 78 ++ .../models/createdatasetrecordsrequest.py | 20 + .../models/createdatasetrecordsresponse.py | 17 + .../client/models/createdatasetrequest.py | 38 +- .../models/createdeploymentarchiverequest.py | 19 + ...teingestionpipelineconfigurationrequest.py | 15 +- src/mistralai/client/models/createwebhook.py | 20 +- src/mistralai/client/models/dataset.py | 7 +- src/mistralai/client/models/datasetpreview.py | 7 +- .../models/deploymentarchiveuploadresponse.py | 30 + src/mistralai/client/models/displayformat.py | 16 + src/mistralai/client/models/displayspec.py | 96 ++ src/mistralai/client/models/embeddinginput.py | 15 + .../client/models/embeddingrequest.py | 17 +- .../client/models/evaluationrunrunscorev2.py | 96 ++ .../client/models/evaluationrunv2response.py | 9 +- .../models/evaluationrunv2withrefsresponse.py | 9 +- src/mistralai/client/models/evaluatorv2.py | 17 + .../models/getdeploymentsummariesresponse.py | 18 - ...etdeploymentsummariesresponsedeployment.py | 75 -- ...loymentsummariesresponsevespadeployment.py | 33 - src/mistralai/client/models/goalresult.py | 21 +- .../importdatasetfromplaygroundrequest.py | 14 - .../models/ingestionpipelinetargetindexref.py | 59 -- .../client/models/metricdirectionspec.py | 30 + ...equestvespaindex.py => missinggoalitem.py} | 45 +- .../client/models/moderationrequest.py | 90 ++ .../client/models/oauth2authmethod.py | 2 +- .../oauth2authorizationcodeauthmethod.py | 24 +- .../client/models/observabilityerrorcode.py | 2 + ...sevespaindex.py => prompttokensdetails.py} | 25 +- .../client/models/realtimespeechsession.py | 9 +- .../realtimespeechsessionupdatepayload.py | 9 + ...altimetranscriptionsessionupdatepayload.py | 4 +- .../registerdeploymentrequestdeployment.py | 68 -- ...egisterdeploymentrequestvespadeployment.py | 39 - .../registerdeploymentrequestvespafield.py | 61 -- .../registersearchindexresponseindex.py | 13 - src/mistralai/client/models/responseformat.py | 4 +- .../client/models/scalarstatisticvalue.py | 7 +- .../client/models/schemafielddatatype.py | 14 - .../client/models/schemafieldindex.py | 11 - .../client/models/schemafieldrankingtype.py | 16 - .../client/models/schemafieldstorage.py | 10 - src/mistralai/client/models/scoremetric.py | 29 + .../client/models/signalinvocationbody.py | 21 +- .../models/simplenumericstatisticspec.py | 21 +- src/mistralai/client/models/toolcall.py | 8 +- src/mistralai/client/models/toolchoice.py | 4 - .../models/transcriptionstreamevents.py | 25 + .../models/transcriptionstreameventtypes.py | 4 + .../models/turndetectioneagerendevent.py | 37 +- .../client/models/turndetectionendevent.py | 38 +- .../client/models/turndetectionendreason.py | 12 +- .../client/models/turndetectionresumeevent.py | 37 +- .../client/models/turndetectionstartevent.py | 39 +- ..._rag_deployments_deployment_id_deleteop.py | 16 - ...deployments_deployment_id_metrics_putop.py | 52 -- .../client/models/updatedatasetrequest.py | 8 +- .../client/models/updateinvocationbody.py | 21 +- ...emetricsrequestdeploymentmetricsoffline.py | 59 -- ...temetricsrequestdeploymentmetricsonline.py | 36 - .../updatemetricsrequestindexmetrics.py | 16 - src/mistralai/client/models/usageinfo.py | 9 +- src/mistralai/client/models/webhook.py | 10 + .../client/models/workflowexecutionrequest.py | 25 +- src/mistralai/client/rag.py | 5 - src/mistralai/client/rag_search_indexes.py | 789 ---------------- ...xt_search_indexes.py => search_indexes.py} | 106 +-- src/mistralai/client/webhooks.py | 20 +- src/mistralai/client/workflows.py | 52 ++ src/mistralai/extra/batch/client.py | 90 +- src/mistralai/extra/realtime/speech.py | 10 +- src/mistralai/extra/tests/test_batch.py | 157 +++- .../extra/tests/test_realtime_speech.py | 36 + .../extra/tests/test_stream_error_hook.py | 78 ++ src/mistralai/extra/tests/test_struct_chat.py | 27 +- src/mistralai/extra/utils/response_format.py | 42 +- uv.lock | 2 +- 221 files changed, 3560 insertions(+), 3491 deletions(-) create mode 100644 docs/models/createdatasetrecordsitem.md create mode 100644 docs/models/createdatasetrecordsitemsource.md create mode 100644 docs/models/createdatasetrecordsrequest.md create mode 100644 docs/models/createdatasetrecordsresponse.md rename docs/models/{postdatasetrecordsfromplaygroundv1observabilitydatasetsdatasetidimportsfromplaygroundpostrequest.md => createdatasetrecordsv1observabilitydatasetsdatasetidrecordsbulkpostrequest.md} (79%) create mode 100644 docs/models/createdeploymentarchiverequest.md create mode 100644 docs/models/deploymentarchiveuploadresponse.md create mode 100644 docs/models/displayformat.md create mode 100644 docs/models/displayspec.md create mode 100644 docs/models/embeddinginput.md create mode 100644 docs/models/evaluationrunrunscorev2.md delete mode 100644 docs/models/getdeploymentsummariesresponse.md delete mode 100644 docs/models/getdeploymentsummariesresponsedeployment.md delete mode 100644 docs/models/getdeploymentsummariesresponsedeploymentdeployment.md delete mode 100644 docs/models/getdeploymentsummariesresponsedeploymentstatus.md delete mode 100644 docs/models/getdeploymentsummariesresponsevespadeployment.md delete mode 100644 docs/models/getdeploymentsummariesresponsevespaindex.md delete mode 100644 docs/models/importdatasetfromplaygroundrequest.md delete mode 100644 docs/models/ingestionpipelinetargetindexref.md create mode 100644 docs/models/metricdirectionspec.md create mode 100644 docs/models/metricdirectionspecdirection.md delete mode 100644 docs/models/metricsdata.md create mode 100644 docs/models/missinggoalitem.md create mode 100644 docs/models/moderationrequest.md create mode 100644 docs/models/moderationrequestinputs.md rename docs/models/{updatemetricsrequestindexmetrics.md => prompttokensdetails.md} (54%) delete mode 100644 docs/models/registerdeploymentrequestdeployment.md delete mode 100644 docs/models/registerdeploymentrequestdeploymentdeployment.md delete mode 100644 docs/models/registerdeploymentrequestdeploymentstatus.md delete mode 100644 docs/models/registerdeploymentrequestvespadeployment.md delete mode 100644 docs/models/registerdeploymentrequestvespafield.md delete mode 100644 docs/models/registerdeploymentrequestvespaindex.md delete mode 100644 docs/models/registersearchindexresponseindex.md delete mode 100644 docs/models/schemafielddatatype.md delete mode 100644 docs/models/schemafieldindex.md delete mode 100644 docs/models/schemafieldrankingtype.md delete mode 100644 docs/models/schemafieldstorage.md create mode 100644 docs/models/scoremetric.md create mode 100644 docs/models/scoremetricvalue.md create mode 100644 docs/models/signalinvocationbodycallcontext.md create mode 100644 docs/models/tokenendpointauthmethod.md delete mode 100644 docs/models/unregisterdeploymentv1ragdeploymentsdeploymentiddeleterequest.md delete mode 100644 docs/models/updateindexmetricsv1ragdeploymentsdeploymentidmetricsputrequest.md create mode 100644 docs/models/updateinvocationbodycallcontext.md delete mode 100644 docs/models/updatemetricsrequestdeploymentmetricsoffline.md delete mode 100644 docs/models/updatemetricsrequestdeploymentmetricsonline.md create mode 100644 docs/models/workflowexecutionrequestcallcontext.md delete mode 100644 docs/sdks/ragsearchindexes/README.md rename docs/sdks/{contextsearchindexes => searchindexes}/README.md (100%) rename src/mistralai/client/models/{post_dataset_records_from_playground_v1_observability_datasets_dataset_id_imports_from_playground_postop.py => create_dataset_records_v1_observability_datasets_dataset_id_records_bulk_postop.py} (58%) create mode 100644 src/mistralai/client/models/createdatasetrecordsitem.py create mode 100644 src/mistralai/client/models/createdatasetrecordsrequest.py create mode 100644 src/mistralai/client/models/createdatasetrecordsresponse.py create mode 100644 src/mistralai/client/models/createdeploymentarchiverequest.py create mode 100644 src/mistralai/client/models/deploymentarchiveuploadresponse.py create mode 100644 src/mistralai/client/models/displayformat.py create mode 100644 src/mistralai/client/models/displayspec.py create mode 100644 src/mistralai/client/models/embeddinginput.py create mode 100644 src/mistralai/client/models/evaluationrunrunscorev2.py delete mode 100644 src/mistralai/client/models/getdeploymentsummariesresponse.py delete mode 100644 src/mistralai/client/models/getdeploymentsummariesresponsedeployment.py delete mode 100644 src/mistralai/client/models/getdeploymentsummariesresponsevespadeployment.py delete mode 100644 src/mistralai/client/models/importdatasetfromplaygroundrequest.py delete mode 100644 src/mistralai/client/models/ingestionpipelinetargetindexref.py create mode 100644 src/mistralai/client/models/metricdirectionspec.py rename src/mistralai/client/models/{registerdeploymentrequestvespaindex.py => missinggoalitem.py} (60%) create mode 100644 src/mistralai/client/models/moderationrequest.py rename src/mistralai/client/models/{getdeploymentsummariesresponsevespaindex.py => prompttokensdetails.py} (64%) delete mode 100644 src/mistralai/client/models/registerdeploymentrequestdeployment.py delete mode 100644 src/mistralai/client/models/registerdeploymentrequestvespadeployment.py delete mode 100644 src/mistralai/client/models/registerdeploymentrequestvespafield.py delete mode 100644 src/mistralai/client/models/registersearchindexresponseindex.py delete mode 100644 src/mistralai/client/models/schemafielddatatype.py delete mode 100644 src/mistralai/client/models/schemafieldindex.py delete mode 100644 src/mistralai/client/models/schemafieldrankingtype.py delete mode 100644 src/mistralai/client/models/schemafieldstorage.py create mode 100644 src/mistralai/client/models/scoremetric.py delete mode 100644 src/mistralai/client/models/unregister_deployment_v1_rag_deployments_deployment_id_deleteop.py delete mode 100644 src/mistralai/client/models/update_index_metrics_v1_rag_deployments_deployment_id_metrics_putop.py delete mode 100644 src/mistralai/client/models/updatemetricsrequestdeploymentmetricsoffline.py delete mode 100644 src/mistralai/client/models/updatemetricsrequestdeploymentmetricsonline.py delete mode 100644 src/mistralai/client/models/updatemetricsrequestindexmetrics.py delete mode 100644 src/mistralai/client/rag_search_indexes.py rename src/mistralai/client/{context_search_indexes.py => search_indexes.py} (97%) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 6bebfa72c..39065f543 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: aa4f5eb5eb7f08b7212eeb2a01909294 + docChecksum: 96e221305329f36665f7195a06b7947b docVersion: 1.0.0 speakeasyVersion: 1.807.0 generationVersion: 2.956.1 - releaseVersion: 3.8.0 - configChecksum: 966a4fcb4502049133f7ae1a87d78668 + releaseVersion: 3.9.0 + configChecksum: aacb646c377eed7f433c5bbf2c947dc2 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 3340c0d3-0f51-4c9c-a92d-576da5ef557c - pristine_commit_hash: d4e1c472068b74da932ea4d05c62b257dec3347c - pristine_tree_hash: faf782b5379867b1492a02a4e804ddee1fcd30ce + generation_id: ea83f808-fb75-4ab0-a90b-ea328f2e6470 + pristine_commit_hash: a240667b688ecfb36160b4c9f6d8947a292f1267 + pristine_tree_hash: 82f5106cf06f742ddbb98775cce783ffd244bdf8 features: python: acceptHeaders: 3.0.0 @@ -62,8 +62,8 @@ trackedFiles: pristine_git_object: 8d79f0abb72526f1fb34a4c03e5bba612c6ba2ae USAGE.md: id: 3aed33ce6e6f - last_write_checksum: sha1:f03ee14f048cbe289ed9f184ee0d3ad7d9f9eca8 - pristine_git_object: c92216498ecdc71bc1212d6e1fb7b70e205fc0d8 + last_write_checksum: sha1:7d68cbe907068df7b9924d0661383670e595cf67 + pristine_git_object: 66356b14c0091733475a18e0a8b685b5856f22b7 docs/errors/connectorerrorresponse.md: id: 35e9c164efef last_write_checksum: sha1:47a309e4f8fdab75ab503a3ade40a90ced43c3ea @@ -242,8 +242,8 @@ trackedFiles: pristine_git_object: 7548286af5d1db51fbfd29c893eb8afdc3c97c4d docs/models/agentscompletionrequest.md: id: 906b82c214dc - last_write_checksum: sha1:13c391a3254d105e3828d39395ccc99e1eecf02d - pristine_git_object: 6079041110cdcc78f579c1f32ef67ea0fef46ebe + last_write_checksum: sha1:70f58e07eab63ed3f862ec48e6912107ba96f09b + pristine_git_object: 5a0e4e0289285bcaa4379311a8cdd90b26361059 docs/models/agentscompletionrequestmessage.md: id: 5337f0644b40 last_write_checksum: sha1:ecf7b7cdf0d24a5e97b520366cf816b8731734bb @@ -258,12 +258,12 @@ trackedFiles: pristine_git_object: 71e35c17b5dbb53a295b8fe29a9f3b73012281fc docs/models/agentscompletionrequesttoolchoice.md: id: bd8a6f9fbb47 - last_write_checksum: sha1:f3d9ec3c82b6bbd2c3cbc320a71b927edcc292b1 - pristine_git_object: 63b9dca9fbb8d829f93d8327a77fbc385a846c76 + last_write_checksum: sha1:0f06c51f71242e8e88c0d8ae27febb2d02adc743 + pristine_git_object: 7f78a1ac84cb25aeb2da90cba108e6feb2942690 docs/models/agentscompletionstreamrequest.md: id: 21d09756447b - last_write_checksum: sha1:5641f4d94fd7bf44e46f71a747d6aca7b50550ec - pristine_git_object: 351d83873978251e983655258b553832eeded121 + last_write_checksum: sha1:6d9b0b5e7d285d84a6e2fa9814c015a26a78d0cd + pristine_git_object: f192beaa4eff55a1d447b00560eec3cbc5c6910c docs/models/agentscompletionstreamrequestmessage.md: id: b309ade92081 last_write_checksum: sha1:98744c9646969250242cbbfbdf428dbd7030e4bb @@ -278,8 +278,8 @@ trackedFiles: pristine_git_object: 2170f32cfe9cfa24ab0fb30f658af4b403c20720 docs/models/agentscompletionstreamrequesttoolchoice.md: id: b1f76f7a4e1c - last_write_checksum: sha1:843c4946d5cab61df2cba458af40835c4e8bcafe - pristine_git_object: 4354523a7d0d21721a96e91938b89236169ccced + last_write_checksum: sha1:6ff37ba47af50d34c11ec37403d38bfaa8130bf5 + pristine_git_object: 184c4580874d0c10cc000a4bab1ea2d96276a033 docs/models/agenttool.md: id: 513b8b7bc0b7 last_write_checksum: sha1:8dedf7bcaa05492689ce0828e5644380258d5a7e @@ -426,8 +426,8 @@ trackedFiles: pristine_git_object: f4ca7dad08e31323b5ad4f77f2192f92a6ca4fcb docs/models/audiochunk.md: id: 88315a758fd4 - last_write_checksum: sha1:b47b295122cea28d66212d75a1f0eccd70a248cc - pristine_git_object: 1ba8b0f578fa94b4f8dddf559798e033a1704e7b + last_write_checksum: sha1:90788ebac91a9aae86cbbbc13058df1062d85cb4 + pristine_git_object: d0bfd6d988bfd108c4aeffd6e76fc34f623d2532 docs/models/audiocontent.md: id: f0b2c5004edf last_write_checksum: sha1:be914519a8fe0ffa2996935ce9b8a359590ebfb8 @@ -694,8 +694,8 @@ trackedFiles: pristine_git_object: c289272622b137541843bb4ba9654d0e1405ffec docs/models/chatcompletionrequest.md: id: adffe90369d0 - last_write_checksum: sha1:8c907c65d99952ba9fcb1b8624068c5e6a014a15 - pristine_git_object: dff270737f9c80b6d979c466ce1b3e4a6cae201f + last_write_checksum: sha1:ff49b84d5403641e4ddafbc165be4010af78f9f0 + pristine_git_object: 34305bafd3be44e9e14fd181ab7ed7cefe126086 docs/models/chatcompletionrequestmessage.md: id: 3f5e170d418c last_write_checksum: sha1:7921c5a508a9f88adc01caab34e26182b8035607 @@ -710,8 +710,8 @@ trackedFiles: pristine_git_object: 52d4935542f9adac9ba43e868a31f09b20226022 docs/models/chatcompletionrequesttoolchoice.md: id: b97041b2f15b - last_write_checksum: sha1:7ad7eb133f70e07d0d6a9def36aadd08b35cf861 - pristine_git_object: dc82a8ef91e7bfd44f1d2d9d9a4ef61b6e76cc34 + last_write_checksum: sha1:cb2d753acebbc48c8774ee55816eaed390df7a0d + pristine_git_object: 728de8a6bf8f3d515c7931a355bd8090feba48e7 docs/models/chatcompletionresponse.md: id: 7c53b24681b9 last_write_checksum: sha1:a56581c0846638cfe6df26d3045fb4f874ccd931 @@ -730,8 +730,8 @@ trackedFiles: pristine_git_object: 7c7b26cd6c469a82bc16aa4b7a794cf3e506efc7 docs/models/chatcompletionstreamrequest.md: id: cf8f29558a68 - last_write_checksum: sha1:494fd61a493326ecc21dd083c85e375464f90868 - pristine_git_object: e966bc1b8516b1dc3b2d7e6a209ffdf8221f6937 + last_write_checksum: sha1:0d6de1cb9cb52a6e7b8eb692c9956dce9221a7d9 + pristine_git_object: 435e924cf8e949eb7fa63eb69c641bd1f980fe02 docs/models/chatcompletionstreamrequestmessage.md: id: 053a98476cd2 last_write_checksum: sha1:8270692463fab1243d9de4bbef7162daa64e52c5 @@ -746,12 +746,12 @@ trackedFiles: pristine_git_object: 446b7712a2ae9deb8a628206a126064e7aba646e docs/models/chatcompletionstreamrequesttoolchoice.md: id: 210d5e5b1413 - last_write_checksum: sha1:0543164caf3f4fb2bef3061dbd1a5e6b34b17ae9 - pristine_git_object: 43f3ca3809bf1a2a040e2ad7c19a2b22db0b73f8 + last_write_checksum: sha1:e7a34f2d166e5b72dc88705516d2e43c41c5b29c + pristine_git_object: d9b50bf6b15ba2d0f3cead690984043290cf5f84 docs/models/chatmoderationrequest.md: id: 22862d4d20ec - last_write_checksum: sha1:9bbe510ee67515092bd953ad7f84ae118398af54 - pristine_git_object: f252482db0e404e21a61aafba0d09d9561610c11 + last_write_checksum: sha1:a6fbb8ef4e4d6592b57c66d8415b92375c2689ea + pristine_git_object: c68774660d0b600842afff9ce927b162dde44737 docs/models/chatmoderationrequestinputs1.md: id: 89311e3e440d last_write_checksum: sha1:8d4c2dbd9207589aabf9c00cf60c61d2d3eef452 @@ -762,8 +762,8 @@ trackedFiles: pristine_git_object: f40a4ebe0780c493e8bd7a322aec31893669a181 docs/models/chatmoderationrequestinputs3.md: id: aec173bca43b - last_write_checksum: sha1:14ce49ace5845bc467fe1559b12374bfd36bc9a7 - pristine_git_object: ff1c6ea32233d5c5e8d6292c62f9e8eacd3340c3 + last_write_checksum: sha1:b5a0cf6055a9e283f23efcd06762438ec2c681d4 + pristine_git_object: 69a8c61296ce730f961c477edcc3abf12b75d58d docs/models/chunkfields.md: id: 3d162f44cb96 last_write_checksum: sha1:e3260bb3fa97104b4f27ede5e9d958c5ae2af8bf @@ -946,8 +946,8 @@ trackedFiles: pristine_git_object: e50c7296f28bbf48daf724af3c848a50e8424ad7 docs/models/connectorerrorcode.md: id: aee48c9e6fd0 - last_write_checksum: sha1:a19fd3b5d8d3f5673a6d7807ff0634fb82ab8311 - pristine_git_object: 1284fdcce823c94cdfedf764c35e6ad7b8e1587c + last_write_checksum: sha1:129141c353687ca4c7a43b104fd46a8a673a5535 + pristine_git_object: 130cca1f4563975f25ae6486b756610e6abaca4a docs/models/connectorgetauthenticationmethodsv1request.md: id: 50edde04fff0 last_write_checksum: sha1:78305fe0052b6b90036ca72302a42dcf9093e3d3 @@ -1284,14 +1284,38 @@ trackedFiles: id: 730ae531a183 last_write_checksum: sha1:5c485d4b95aa1147318bfa90950649bb1ce43dcb pristine_git_object: 05c0318199c75958b47d5efd2c08cd5c7d75dc08 + docs/models/createdatasetrecordsitem.md: + id: 353b52103b0d + last_write_checksum: sha1:fb3a4d285d7d3c32c526438ed9597735079df6ef + pristine_git_object: 87f5cf4740831e993dc5abd100ca42bb838d4a07 + docs/models/createdatasetrecordsitemsource.md: + id: db89022fe5a3 + last_write_checksum: sha1:8cf1bf10005f05e400852055f86354c5b7c19301 + pristine_git_object: fbe61d23203eab079c67a7153d2e2b044f6a9a1d + docs/models/createdatasetrecordsrequest.md: + id: 6edefa6466ea + last_write_checksum: sha1:a818f71965cbb251e8c91774d7ffa33ab29447a3 + pristine_git_object: f082a6d13100d9d69468aaa8395c8abe30f110b1 + docs/models/createdatasetrecordsresponse.md: + id: 4a8316553831 + last_write_checksum: sha1:b66d3a3025dd976d97488f00e4bb749ade2390ae + pristine_git_object: d707c547375dce4ba4e8d1f2fa1293b8c3295655 + docs/models/createdatasetrecordsv1observabilitydatasetsdatasetidrecordsbulkpostrequest.md: + id: f1f744f0248d + last_write_checksum: sha1:4c2222390a1c32d8f5d14c0b30f1dece2711b39e + pristine_git_object: 8105d566375dcabf4767dab078b6c6496305031a docs/models/createdatasetrecordv1observabilitydatasetsdatasetidrecordspostrequest.md: id: 599b04b8f392 last_write_checksum: sha1:7994c79dbcd2f6c267197c0be1cee6e01ac72f2d pristine_git_object: 8db3ea7f3ca59f346d86a575ec91a809dbaee997 docs/models/createdatasetrequest.md: id: ff55db5edd8c - last_write_checksum: sha1:840cddba3faaee46a0a65a92e3f09b6079ac410d - pristine_git_object: d4c166436a4d3cdafcc5990215b0ee2ea2ff9571 + last_write_checksum: sha1:82e804459fda0ce16ad2b0b4ee77dae08faa4a24 + pristine_git_object: 0042baa998f90d4f69267f550521d2286922b3a0 + docs/models/createdeploymentarchiverequest.md: + id: b5d387f5b50c + last_write_checksum: sha1:2be376d791ee7d76f5832a049c976e2b929806f3 + pristine_git_object: 432c61463bb8951bab01fed253a508840cbd03be docs/models/createdeploymentrequest.md: id: e621e94416c5 last_write_checksum: sha1:e6827f9042c9941fc2e36e38bb0657ddd3c9ad11 @@ -1314,8 +1338,8 @@ trackedFiles: pristine_git_object: 8941daa0c78567d17e83c837ba26c59c411315b7 docs/models/createingestionpipelineconfigurationrequest.md: id: fec0e339a487 - last_write_checksum: sha1:63b042068e1302be85e2103376742fc054c20564 - pristine_git_object: 96b788481e09169f07796eb9e074a1fcac46a6b0 + last_write_checksum: sha1:1a3dad0fa0f5ac30494c6207a11e027c3bf1a349 + pristine_git_object: f6aeb2105adebedd85c3242c693616b14816ec63 docs/models/createlibraryrequest.md: id: 8935b2ed9d13 last_write_checksum: sha1:e7ab5edfd290e1a32e7cabcb0c2f770f823f93e5 @@ -1474,8 +1498,8 @@ trackedFiles: pristine_git_object: 8c276759655849452987938087011af5f8708e30 docs/models/createwebhook.md: id: 3103d2a611e4 - last_write_checksum: sha1:8407f19ba9163a9562077394bb504c8dd6fc38a5 - pristine_git_object: a8adb59d9f7c01e485029188309b73c920a4cda3 + last_write_checksum: sha1:483999e89c94663cfb97d02d61f50c46c462c35a + pristine_git_object: 9588b161949729027cdab8a0b3ea274e5d14c2f0 docs/models/credentialscreateorupdate.md: id: b2a0e87b0a91 last_write_checksum: sha1:0db5459a513bb79ca64c99fd38b0bbe9d8883e12 @@ -1554,8 +1578,8 @@ trackedFiles: pristine_git_object: 24ec13fbdf8d26f8232b03658ac0eacc13719dc1 docs/models/dataset.md: id: 31af4d237e19 - last_write_checksum: sha1:3e30b011681d12fc932f4e7c1e447ac7740dea87 - pristine_git_object: a7e7471db3a294b51ad8d1f8f2e6d62a95381513 + last_write_checksum: sha1:78b12a4ee6dd0024518085ccc384cdd669e44b0b + pristine_git_object: 5fa72c69d74d466d6ba7cc1b7e5cd46cd2b100fe docs/models/datasetimportresult.md: id: e03af4f79a3a last_write_checksum: sha1:d2d17f260ae104d98d7dde583e5995be84256dd6 @@ -1566,8 +1590,8 @@ trackedFiles: pristine_git_object: 29a67c31fa9875c8cc2e83427dc92ba0f5808b03 docs/models/datasetpreview.md: id: 5e080239e3e1 - last_write_checksum: sha1:1e7b506006b94ec430de0fc90e15387e6a31f0bb - pristine_git_object: 55c647fa0c47c4898b73085c4137ccf0c1e4e614 + last_write_checksum: sha1:288566b0849cd69d77da915964affb043c914890 + pristine_git_object: 09efd45644bd79eb6361d918914aa5ccb97a31da docs/models/datasetrecord.md: id: 449ed69d3872 last_write_checksum: sha1:8685807735fdda2d6808632261d325dca5c7dcd2 @@ -1680,6 +1704,10 @@ trackedFiles: id: c9806b9cd328 last_write_checksum: sha1:1b4eb9f791fde0b33ec049c8c87516b618a20fec pristine_git_object: c2b2b8d310b1f554198690a3cb644698453a93b8 + docs/models/deploymentarchiveuploadresponse.md: + id: fc58d16840cb + last_write_checksum: sha1:54a49d2e7f4e128cde9df7c731699a38c1ad4bd8 + pristine_git_object: e7b66892996b8d7e08fbbf196f0501adca07e83b docs/models/deploymentbuildstate.md: id: 7019a1189d21 last_write_checksum: sha1:9b6733368e984fb7267420507282b72bbd9f617c @@ -1772,6 +1800,14 @@ trackedFiles: id: 62aa5918033d last_write_checksum: sha1:17cf41f78367b69594c6a38f5d345a9c4264f1a8 pristine_git_object: 8b532d6b4b735b29a629e095fab28422ea593063 + docs/models/displayformat.md: + id: 8238b5aebbe8 + last_write_checksum: sha1:93eb7f6b4d50e0ca91a5a2bedd47df8347c1fcce + pristine_git_object: 93509374400cfd21cc8d9d8446182cbd5d1be742 + docs/models/displayspec.md: + id: 58a54e4382af + last_write_checksum: sha1:7a1a14ffa8dc3aa1b41954b751649b3b73790cab + pristine_git_object: 871c760aad68c44df4e7a27cd0ba76df5c71c844 docs/models/distancemetric.md: id: 8543b7a9de07 last_write_checksum: sha1:8aa73e9b28b31088f8484d7c23f070d2e449d807 @@ -1832,14 +1868,18 @@ trackedFiles: id: 22786e732e28 last_write_checksum: sha1:1f348c1b3dba72dd710c1eee3953556d051366f8 pristine_git_object: 301585b20b8e5c433dbff021782a543c599e6115 + docs/models/embeddinginput.md: + id: 90b1e98b4b53 + last_write_checksum: sha1:c994faef8ef1adceb7c0610d848d69d45333d2d2 + pristine_git_object: d3907bc2738ac33eca5dbe75ab22f7ad2988f25f docs/models/embeddingrequest.md: id: bebee24421b4 - last_write_checksum: sha1:087230e81cfbbc539edc7cc1c0a490728276d217 - pristine_git_object: 71d139cdf5c556a1224d707be70f3fabe032fc27 + last_write_checksum: sha1:0fbeb3654c6cb36f2f3421bc5cfd781501a23f57 + pristine_git_object: 6ff2c036e9c51435fd1b1e15266b4247bd33dbaf docs/models/embeddingrequestinputs.md: id: 6a35f3b1910a - last_write_checksum: sha1:f3bf6b89f279f59010124aa402e282c7c691eb03 - pristine_git_object: a3f82c1c67c726d3ef8e5e5ea5513386acc7c2f4 + last_write_checksum: sha1:81a7c513810924e879fb148efa447b63b8244a03 + pristine_git_object: 4d00efcd20d6771894235621267153283c6bf07a docs/models/embeddingresponse.md: id: 31cd0f6b7bb5 last_write_checksum: sha1:1d7351c68b075aba8e91e53d29bdab3c6dd5c3a2 @@ -1916,18 +1956,22 @@ trackedFiles: id: "707921507e55" last_write_checksum: sha1:9e62b01f8879cab81cea00cc13f80a6eed0645cf pristine_git_object: 3d471042fb656a4e25262866fb2ae06f78cede61 + docs/models/evaluationrunrunscorev2.md: + id: c6794186836d + last_write_checksum: sha1:e0875e350c93d21e9164b748dc8d47b8fa69d4f1 + pristine_git_object: d4afeaf98b1cddb2ed7d3e2aa844010f037c03e8 docs/models/evaluationrunscorev2.md: id: bbb6be858b35 last_write_checksum: sha1:54cf2d7089e525758b4dbe4ea18fcaf408aecda2 pristine_git_object: 00a256209bfc61e824020345c7883245addfb3bc docs/models/evaluationrunv2response.md: id: 9438501040f2 - last_write_checksum: sha1:f183d65c501b318c03f20a74b21d4edf67d4eec5 - pristine_git_object: a51f02f184b132b8a78467a1c6b59f66613a5645 + last_write_checksum: sha1:07169e53c231f07da1bff5c4d104b11bbf503a7c + pristine_git_object: e2231a76ada4b1d593cb4f7bb93816b025e9643f docs/models/evaluationrunv2withrefsresponse.md: id: 55cc91db64ab - last_write_checksum: sha1:7d7afe54288a71ffbfb79b3c230e530092c2188f - pristine_git_object: a9965ed7e55f74d7726b21cfe428d9e6620e52bb + last_write_checksum: sha1:b1737c2e8c26368257f97ea048473da48b82a64b + pristine_git_object: 45af9f92c018d730e521be80792d677eebc3f351 docs/models/evaluationsv2.md: id: 13095bb51115 last_write_checksum: sha1:c0b5c3513889ad9f9c9367e8ca9687475decc775 @@ -1942,8 +1986,8 @@ trackedFiles: pristine_git_object: 2361dfe46271d8a7b26ace51bea821f9af013ef7 docs/models/evaluatorv2.md: id: cc9a95e90155 - last_write_checksum: sha1:f29cf3b04d2566efde3b25725d6fb5f36bac96ac - pristine_git_object: 1dd74b7e96141f3c161f8e1e04ec7447737591cd + last_write_checksum: sha1:83f289506cbcc9371f4e1edd544aced3d200ff6b + pristine_git_object: 31b55bc66fa1c1421eaa870311fe9cf8295af671 docs/models/evaluatorv2direction.md: id: 1f23f54704e1 last_write_checksum: sha1:0fb30bd037b34b2ba0a2fca35adb7cfccffb71b1 @@ -2244,30 +2288,6 @@ trackedFiles: id: 83372a03f641 last_write_checksum: sha1:ce3d159fe81bb6d34392000677290083f3065ce0 pristine_git_object: 7dfd6b054343bae27f890614c41a775726b76889 - docs/models/getdeploymentsummariesresponse.md: - id: a4553c9ddb4e - last_write_checksum: sha1:8cca88c3bbe5e7c3876fc66ac377a4088845c9a4 - pristine_git_object: feb01415cc9bf24708260ecc5b016d093d8c30eb - docs/models/getdeploymentsummariesresponsedeployment.md: - id: 0a34c17ae332 - last_write_checksum: sha1:939bcc12f7420558ce7110b9fb57ab54e4fda09e - pristine_git_object: 88d215e4e1fd37630f40966b924a92aa78b26cac - docs/models/getdeploymentsummariesresponsedeploymentdeployment.md: - id: 7e23da0a02df - last_write_checksum: sha1:a7f3ab94272c6202d313b9b7dac115447abf9001 - pristine_git_object: 1c0bdce14669dd27a3ee6cbbc0bfb4166509cc50 - docs/models/getdeploymentsummariesresponsedeploymentstatus.md: - id: adc183a1e712 - last_write_checksum: sha1:9521068fe01793005a02e94958627bb7a6cce419 - pristine_git_object: cd13b75ac8b2279fba74ac3ef366dfe95d563b1c - docs/models/getdeploymentsummariesresponsevespadeployment.md: - id: b221d82d5807 - last_write_checksum: sha1:da0654da88381fad7331a64ff5db8ce63e5bd2be - pristine_git_object: afa1fdc07734d9f69dec5be7a7f8a5f47db37122 - docs/models/getdeploymentsummariesresponsevespaindex.md: - id: da1151cea19f - last_write_checksum: sha1:0130432200b5a0eb5f4584c3d1873d1424bc912b - pristine_git_object: cd6f7e832900fbda562dc9f9b5de4d390a5e73e3 docs/models/getdeploymentv1workflowsdeploymentsnamegetrequest.md: id: 655b59bc906d last_write_checksum: sha1:b3651f4e3d37de228f196c5e12fac239cdde379d @@ -2598,8 +2618,8 @@ trackedFiles: pristine_git_object: 56cefd67e15ba32a246d3a4815786239a7c4d0af docs/models/goalresult.md: id: 80e52ebf2028 - last_write_checksum: sha1:b8648293c8c87469c450b4e259543751755668bf - pristine_git_object: cb507c3a1e43d02effa2ae28c62fbf64a782eab8 + last_write_checksum: sha1:7225d64d0b95428aea0f7cbbeb1a5b7bf2516abc + pristine_git_object: 0698ed4e517b883fe39d32b9071a979afc64dbe0 docs/models/goalresultitem.md: id: b614ac1c21b3 last_write_checksum: sha1:e4fc3af3f1c4b19053fe07a836a1fcb5ccc9aae6 @@ -2700,10 +2720,6 @@ trackedFiles: id: 72ced1c6e5e8 last_write_checksum: sha1:8c59196fc4645fbaf5c735f26f2fbb2e1f6109a2 pristine_git_object: a05e97258f266440456381634538cb6d97ac015f - docs/models/importdatasetfromplaygroundrequest.md: - id: 74bd521abc26 - last_write_checksum: sha1:a4efe4ff8c52137af47d6ab750d1d2f7cba77e7c - pristine_git_object: 72a586bc65f6219abed50105d9df9cb8b6ec8d02 docs/models/importdatasetfromspansrequest.md: id: 491f834aecc3 last_write_checksum: sha1:781d9ad1f7eb72ecfe10fb522598bb0b80bcf91a @@ -2728,10 +2744,6 @@ trackedFiles: id: 95a1d6bf413b last_write_checksum: sha1:ba9e052c6ab8b13b4108ff395ac0e20181326f0b pristine_git_object: 16fde9c6a161526de8a86ccd330803f590285586 - docs/models/ingestionpipelinetargetindexref.md: - id: 3008f8f0680c - last_write_checksum: sha1:f4e9f55f9e14805b26cdf64376934e5acfcac0e5 - pristine_git_object: e6fcfe30d433752b8118267d32e2814421126738 docs/models/inputentries.md: id: a5c647d5ad90 last_write_checksum: sha1:4231bb97837bdcff4515ae1b00ff5e7712256e53 @@ -3372,14 +3384,22 @@ trackedFiles: id: c6bb0db68c7a last_write_checksum: sha1:a1775ce770440b0b6c51230264f75373c11a6891 pristine_git_object: 314a67165a20e8672602f1bc3c1d3bac6e1aec6d - docs/models/metricsdata.md: - id: 4681c89ef9b1 - last_write_checksum: sha1:bcdc255043b4611670c55bdf8b814358090520a9 - pristine_git_object: ab3b0389efd5eda8b58fcaf12659a94b48c5582e + docs/models/metricdirectionspec.md: + id: df9bf1a048ab + last_write_checksum: sha1:fedf87ec094e109c90cea77ca9d20a20da215d36 + pristine_git_object: a7be4f4a0e09841d0db3869103617e9e7fc508ec + docs/models/metricdirectionspecdirection.md: + id: be146cb6dfbf + last_write_checksum: sha1:a519c3ac058c1a2259ed87a21ee25c110706a32e + pristine_git_object: 3f905e5ca64686d1f4df5e843e102f183ac4dc02 docs/models/metricvalue.md: id: c89bb1d44735 last_write_checksum: sha1:cf33e0bfb37f14123406d3bdaa1a0c565f726a4d pristine_git_object: dd998dcf1a5b2f050ac091510e522d4ad48fb376 + docs/models/missinggoalitem.md: + id: aadae289ccbc + last_write_checksum: sha1:3c4271a6c8ce12a4e3dd4110b9eb0a2fb830d112 + pristine_git_object: 2752eb457c55c70ed6646988c5595bfcac821a35 docs/models/mistralembeddingmodel.md: id: 2886fd9adcce last_write_checksum: sha1:3500a39a7fbdcbd0286e2efc8dcb65376da3a4aa @@ -3436,6 +3456,14 @@ trackedFiles: id: 4e84364835f5 last_write_checksum: sha1:2831033dcc3d93d32b8813498f6eb3082e2d3c4e pristine_git_object: 320b2ab4935f8751eb58794e8eb9e422de35ae7c + docs/models/moderationrequest.md: + id: 242692d1e64c + last_write_checksum: sha1:d8bd5624461b9ee1eeb05fe0bd66746461f01cd7 + pristine_git_object: a9742011db079cbc6e66f18a0294161629ad6ee2 + docs/models/moderationrequestinputs.md: + id: d9fee879a49b + last_write_checksum: sha1:93e7443381962d1e013ad6c08052e7db0eff3210 + pristine_git_object: 8e4707c9ad6794100bf15e9c28bc709af8394780 docs/models/moderationresponse.md: id: e15cf12e553b last_write_checksum: sha1:18e8f4b4b97cb444824fcdce8f518c4e5a27c372 @@ -3502,8 +3530,8 @@ trackedFiles: pristine_git_object: 0da59e8ef5fa048ac4f2266a1f48887f8d110833 docs/models/oauth2authorizationcodeauthmethod.md: id: 80231259a5ed - last_write_checksum: sha1:b0646c67885bb509e43bb701cebb9a1385eaba1d - pristine_git_object: 898b8472b7aeed335b6122a10e111bb18ee45b91 + last_write_checksum: sha1:fb7a4768721954ebeed7defefa091a4bf20c5e0c + pristine_git_object: 4e000f118fe01dff1b83fa27ab88379e604c3804 docs/models/oauth2clientcredentialsauthmethod.md: id: 0a053c797369 last_write_checksum: sha1:83ca256490fa564ed53bf8f85f99c83fe298b686 @@ -3534,8 +3562,8 @@ trackedFiles: pristine_git_object: 22e2804a4424325ad07c264a61463635299fc254 docs/models/observabilityerrorcode.md: id: 61d16ff95b87 - last_write_checksum: sha1:15761b9b4d0ae01261b17aca5c569a0d067fa67b - pristine_git_object: d626e8bd750e081b6af18551c8c919449c5d0b85 + last_write_checksum: sha1:05cfad3f209fce491f94a93d428fb57225bddaea + pristine_git_object: 270ef71e267fd9175886492c85e95bfd1c460e1a docs/models/observabilityerrordetail.md: id: 38061447dfbb last_write_checksum: sha1:1da7bf6e72c2f972b0e22f0201a1cb9b76f53ccd @@ -3876,10 +3904,6 @@ trackedFiles: id: ffc31f79f514 last_write_checksum: sha1:8cff9f19c50f920161c70e9a4c724e8e1c3dfa58 pristine_git_object: 1e083c433e1086a7575173288f5c8b24dc1320ce - docs/models/postdatasetrecordsfromplaygroundv1observabilitydatasetsdatasetidimportsfromplaygroundpostrequest.md: - id: a3c711a50d05 - last_write_checksum: sha1:5bdd63af46d9845e4ff4960b9ba42e084b4f938d - pristine_git_object: 08db8ad94ab8de09d49fa54edcdf58008c1ef0f2 docs/models/postdatasetrecordsfromspansv1observabilitydatasetsdatasetidimportsfromspanspostrequest.md: id: ef891ce33670 last_write_checksum: sha1:8477011ac2e7a649e7719430131962620ec31936 @@ -3980,6 +4004,10 @@ trackedFiles: id: 327de0066e86 last_write_checksum: sha1:db07389f762ea8e69bd6f661d9e7f14f38093806 pristine_git_object: f46e47a0e9389830cda6385a6f9cddf4bcdc9aac + docs/models/prompttokensdetails.md: + id: 1391892fce0a + last_write_checksum: sha1:0e68dfaa2635a0884d0b3a9ef92b1d755cb3a866 + pristine_git_object: 2421ce7106909604c44d3be9f3a63db3ccebb9da docs/models/promptvariable.md: id: 2e9f9dbaf1a3 last_write_checksum: sha1:6fbb6fe14fcaad4e86189c876c0a9338f4edba9a @@ -4062,8 +4090,8 @@ trackedFiles: pristine_git_object: 48041c5d5d1662dd28f1c450d41dcc86db496dcd docs/models/realtimespeechsession.md: id: 28b2f5a82537 - last_write_checksum: sha1:e9ceb29414b8e0d2e7772ad9e93b2a710f2972c3 - pristine_git_object: 256b2bfdd18c406cc2dfaef3d08861ca112cad7e + last_write_checksum: sha1:8eaafefbe5a212046c7c9787590683e63b64d2f4 + pristine_git_object: 138f899eaa3a808029a12841881f3bcfd31db824 docs/models/realtimespeechsessioncreated.md: id: 6a5abd07b3f5 last_write_checksum: sha1:22de922e7be85645946e42aedab732f3a2a4be5b @@ -4078,8 +4106,8 @@ trackedFiles: pristine_git_object: 6f96b67c2b112ef3b4253d5eb856c19ce1ec59b2 docs/models/realtimespeechsessionupdatepayload.md: id: a9ee3a4cd31a - last_write_checksum: sha1:66967ecf8d6d7be1f2a39ff84ebba68895764c7d - pristine_git_object: b931680851ddd15e5c22caae3284956c77dafb1a + last_write_checksum: sha1:0eb2ca14fd34d92e3705080117e560664becc9db + pristine_git_object: 237871dab471c8752e052812422d2ded27aa5f86 docs/models/realtimespeechstreamingmode.md: id: 0fde6b6275cd last_write_checksum: sha1:d376a19ffa871b3375b33a517e17527bc46454d5 @@ -4126,8 +4154,8 @@ trackedFiles: pristine_git_object: 2a50ca92720bad6605bdeafd83b43d0e8bf40615 docs/models/realtimetranscriptionsessionupdatepayload.md: id: 3ddd5a95510a - last_write_checksum: sha1:7bbbfa5e6aa37b46a7e5af5069c76e28ea68c7c9 - pristine_git_object: db590af90bbce2d0a9c4c2295a8fca8d52094486 + last_write_checksum: sha1:14f49df414ba6a76cbafe5359aa6ecc478e7c3c0 + pristine_git_object: 6c51eb4f3cd83575956f4ada19f83840bdfb4e75 docs/models/reasoningeffort.md: id: c8fd630d3f07 last_write_checksum: sha1:54aafb448de47209e329dbf4e4516dc328631ef7 @@ -4144,34 +4172,6 @@ trackedFiles: id: 22fa492a467e last_write_checksum: sha1:80161796acbc185876a3656ee8cbdde4df7e23d0 pristine_git_object: 1d29397fd96b42b7dc33bd10184bef55de5ae066 - docs/models/registerdeploymentrequestdeployment.md: - id: 0c5564a7a5e8 - last_write_checksum: sha1:d3a077a764900538087d4f9bd10cf5b2bea69edf - pristine_git_object: d034935dde5a6a561a259bcc3f7930ab9405f933 - docs/models/registerdeploymentrequestdeploymentdeployment.md: - id: 17ee08e928c1 - last_write_checksum: sha1:297be32b822fe227c56d538765f0e6eb070a4ce0 - pristine_git_object: 43e02cccac0a6796d0b6ed118ba52c998606b3ae - docs/models/registerdeploymentrequestdeploymentstatus.md: - id: 650d585391d9 - last_write_checksum: sha1:cb9f23216f9cf3c7c56c636d47f2953c9d1f486e - pristine_git_object: 699406eb901bf94c718ada77a1bd06c96e41b3f9 - docs/models/registerdeploymentrequestvespadeployment.md: - id: b124d48ceb61 - last_write_checksum: sha1:7f4b7c5f40071adea994459b2e430757e585e9c3 - pristine_git_object: 034ab90fabd43d5a3838a9198c5054108c8954ab - docs/models/registerdeploymentrequestvespafield.md: - id: cbddf440da8d - last_write_checksum: sha1:1d22cdf2c94fad6ffe402f6632d3fd1ba5c8be33 - pristine_git_object: 016f77ca191b2bccaa444e70b12b09f04a819ce2 - docs/models/registerdeploymentrequestvespaindex.md: - id: b1acca3ed627 - last_write_checksum: sha1:cf79e860676213ab6a38096699a59edfe992d891 - pristine_git_object: e10a763afe7a58ffade4bfbd7565fa980ad22a33 - docs/models/registersearchindexresponseindex.md: - id: 762403047d13 - last_write_checksum: sha1:e2d57be7f7a862a6a44d181c5480d597909ea945 - pristine_git_object: cfdde548cdff5b7d73ad1b697de5583bd91f157e docs/models/registrysharingscope.md: id: 55561a8bda82 last_write_checksum: sha1:79714f86526320aa853f975151b75fdb084c7ef6 @@ -4254,8 +4254,8 @@ trackedFiles: pristine_git_object: 368f23184def4b3d4fe1f7c8a06693afb3eac4dd docs/models/responseformat.md: id: 50a1e4140614 - last_write_checksum: sha1:e877b2e81470ef5eec5675dfb91a47e74d5d3add - pristine_git_object: 5cab22f2bf1c412699f6a7ed18ef801ecbc3ee4b + last_write_checksum: sha1:ddbc56c2c37a14ed9ff8364b2bac93473e0f97b4 + pristine_git_object: 63dac12d6cef8fc7212fc4908e009c7d0b90dd4e docs/models/responseformats.md: id: cf1f250b82db last_write_checksum: sha1:c7fedb61c8c40d4ff6bebefa37133668e5a8582d @@ -4802,8 +4802,8 @@ trackedFiles: pristine_git_object: 6723310e9e340eebf58f11dfdc2417d030a87a60 docs/models/scalarstatisticvalue.md: id: 4b7255eb4d2f - last_write_checksum: sha1:afdad7ec8d19335d87abfe118f8419fdf550bf1b - pristine_git_object: 95e9f8d1c4a0d90fff8ef2b52d2bd1592ec1b5ea + last_write_checksum: sha1:3f9d5769372ba79005424fbe0a896eec2c73ab55 + pristine_git_object: f8a521994adbf7663e14ea90cbf3206f55dd9849 docs/models/schedulecalendar.md: id: 60c22b27e191 last_write_checksum: sha1:6c5457c6c0f2393e41c297e42d25ca95a14f752a @@ -4840,22 +4840,6 @@ trackedFiles: id: c093e67b0d4d last_write_checksum: sha1:c8f57f472e2df609a23d94bf07684348bb007d04 pristine_git_object: f849e1ae2896ee6db55c7af27f575f9f6c8c9132 - docs/models/schemafielddatatype.md: - id: 98f2fef83098 - last_write_checksum: sha1:1fcc6144cb3ab7fbee303296af8af897658cc454 - pristine_git_object: de32192291d17b8d5be84336597f27b8f66d5f42 - docs/models/schemafieldindex.md: - id: 341817a0930d - last_write_checksum: sha1:4367667f5418b674ad906f70bf471db32d063dca - pristine_git_object: a30cc0c7a86860607dc87b9a68518299840eff59 - docs/models/schemafieldrankingtype.md: - id: e0db6aeb7ff3 - last_write_checksum: sha1:b010c47e642446932fe01d53bdc0242ac20373bd - pristine_git_object: 6236c7f4bc704c35bc271aafcf47c1978255449d - docs/models/schemafieldstorage.md: - id: 730b7561c028 - last_write_checksum: sha1:b791db71979818dcf8cb9e5f3e11a962926d6795 - pristine_git_object: f0bd62641ea2b56175adbf28f64bd8e3ea8ebd6a docs/models/scope.md: id: c7d8338540ba last_write_checksum: sha1:08e688325601e4c4614cc6b7264ea4d2f631da36 @@ -4872,6 +4856,14 @@ trackedFiles: id: b5846cfe0e6d last_write_checksum: sha1:9b428fffbdf3faaa8a09a3ed1be1cae7cb7b8f27 pristine_git_object: aacbe8c8460b9a5a2652b6258149232cf5d0b05a + docs/models/scoremetric.md: + id: 7313ba55a829 + last_write_checksum: sha1:23a001574c64e3ec86f0130bffae183aeccded54 + pristine_git_object: bbbb0abf1acc982f2e2cf555f15a6c9e2ae88c23 + docs/models/scoremetricvalue.md: + id: 1183a2981d60 + last_write_checksum: sha1:6e8cd6ac3491f7cf18707fa20607b4d657228754 + pristine_git_object: da4abec57bbf3b5d7f159ab2717246b7324a55c6 docs/models/scoreoperator.md: id: b9287a0bf2df last_write_checksum: sha1:ad1679de5517e6fe745575b9c5b1988f5aa6a7fc @@ -5034,8 +5026,12 @@ trackedFiles: pristine_git_object: c1974f70ef9676beb9fefae2c124e231da5b1b6b docs/models/signalinvocationbody.md: id: 9723986308b4 - last_write_checksum: sha1:4c005bb178a814e1f23bcb5112a0ba61df96ad92 - pristine_git_object: 14dc23e0e9a8d74b7275daf8a492d6a0a83d5e8a + last_write_checksum: sha1:1feaac765a505bccf29d63fba4f9d042fec5e1c1 + pristine_git_object: b35cf6af756176cfc5a946854dda30c287eca0a5 + docs/models/signalinvocationbodycallcontext.md: + id: 44aaad9e0cc4 + last_write_checksum: sha1:567062ae45092572eb711ac713b24bb0cde3f94c + pristine_git_object: 5488aa41b57ab1e70ee59c9e77b13bc5d0529a7e docs/models/signalinvocationbodyinput.md: id: db0ac2b1de58 last_write_checksum: sha1:edda01f077f43a2527900caab977d4d07f2e8eff @@ -5054,8 +5050,8 @@ trackedFiles: pristine_git_object: f65d7924388b842863deddb0e52d4376f2e28925 docs/models/simplenumericstatisticspec.md: id: ee9d36640e49 - last_write_checksum: sha1:9bcb3b4243fc320051e50890eab7dda9f8ca1b47 - pristine_git_object: 9c8327137404dba3596b491e0672bd0e14410ee6 + last_write_checksum: sha1:95ac16fb31013276608932e9ad27cd1918e7dfb7 + pristine_git_object: e8199baa2f046e8af4c3772ebbeb2f593e48bb9e docs/models/simplenumericstatisticspeckind.md: id: f6f2405aab52 last_write_checksum: sha1:261f8688fca9d7a302d0dc694c0a5ed10f5558ed @@ -5556,6 +5552,10 @@ trackedFiles: id: eb4d5a8e6f08 last_write_checksum: sha1:b423f56d3a6004ed89c356806002b2af3e5c5a56 pristine_git_object: 4c84779c4d2e8bf2a2fe258c2b350b05d047f2e3 + docs/models/tokenendpointauthmethod.md: + id: ecc9be73734a + last_write_checksum: sha1:b54f3a4c6830cd724810565a6d89bf629b703df8 + pristine_git_object: ae3247a7f5bd70a937bdb91dbbe5ab5792bdf009 docs/models/tool.md: id: 8966139dbeed last_write_checksum: sha1:2ab2016846da06ab38751176ba80fb6527c2818b @@ -5566,16 +5566,16 @@ trackedFiles: pristine_git_object: 3ef17e89140c3495760d4276cba4a2d65efbda71 docs/models/toolcall.md: id: 80892ea1a051 - last_write_checksum: sha1:621dc83981e13cbcbc21f2e16a34178c322c4566 - pristine_git_object: 9d236e8b289977d2aa7bded0d633b224c5ec9e57 + last_write_checksum: sha1:bf6c08f22d0b8fcc44c0d72da1d5d24d4e5713e5 + pristine_git_object: 4211918be34c8cad4a270ba7dc9ca6b00609f240 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:65a2794a1102fdcba6fa5a3f497630fbaf98f94b - pristine_git_object: a457f96f6e295d590a5ef75f83a5a6c4fdd41c47 + last_write_checksum: sha1:47ba14f10ba87afa0d957b1fdba5b10179dbcee9 + pristine_git_object: 9e178a0012ac1412732b169063d7847ac7098eee docs/models/toolchoiceenum.md: id: 15410de51ffc last_write_checksum: sha1:cdff87c62661fcb902824fda8e305c5b1b98b3d8 @@ -5690,12 +5690,12 @@ trackedFiles: pristine_git_object: f760385dfbd9779e63d61ec6357901bc9b4ca8e9 docs/models/transcriptionstreameventsdata.md: id: 506af75a0708 - last_write_checksum: sha1:99fcb3bf3aab0fb87dc02a4e6ccef9271ff0ae89 - pristine_git_object: eea8e9281634c56517e28f613afee38e0b0846ad + last_write_checksum: sha1:f966027308440ed4efaffd345f0b6043a205e201 + pristine_git_object: 05cd0b664a79a5f7c85f060392a266f30d11a286 docs/models/transcriptionstreameventtypes.md: id: 701782e8a63d - last_write_checksum: sha1:7a6fc032e6dd63912472b9158c07cf20ceefe7e3 - pristine_git_object: 9e49384e399f15e70382050ee414a7446d1e4b70 + last_write_checksum: sha1:a3bc32a3dd7c3ff8edeaf7edab68aaa31120f1ec + pristine_git_object: 6febb73ba8dfbb9bc6631296e426ed47b3344c90 docs/models/transcriptionstreamlanguage.md: id: 5e9df200153c last_write_checksum: sha1:d5626a53dde8d6736bab75f35cee4d6666a6b795 @@ -5778,24 +5778,24 @@ trackedFiles: pristine_git_object: 4af2a79dfe0f087ba9360c9cfcd9e06865543079 docs/models/turndetectioneagerendevent.md: id: 203ac0c71fd0 - last_write_checksum: sha1:b8ae4ce53cba7e3e7842f6a43aa919e916c421a8 - pristine_git_object: 9739161d25537e97f50375946b1cd44c60180241 + last_write_checksum: sha1:a6b24a4e2b81f61c856563e36a68ef751518e1b2 + pristine_git_object: 4d412944539cd6a5ff1dc082982ebea9286fbcb8 docs/models/turndetectionendevent.md: id: 20d0aa3409fb - last_write_checksum: sha1:755c288abc816a9fb34f9b03f2f3616a6722ca1a - pristine_git_object: 76c9fc708b68d8e7ef2c53a241ba04ea272d9853 + last_write_checksum: sha1:2c93a4c397a014c2662c7ed8d34314e77ec00ec1 + pristine_git_object: 1ff18ac65afca2583d87a35fae5e51717b924519 docs/models/turndetectionendreason.md: id: e604acdd51df - last_write_checksum: sha1:f64766acf20e97f65643471bf1fe9bd33e9d46f2 - pristine_git_object: 59533839e73d57246e704129262468e3bca161b3 + last_write_checksum: sha1:89b914deefa2060cdc68b99bf0932da0bf338e71 + pristine_git_object: a21d12b9038cada014a796d71fcd05fd963ea9dd docs/models/turndetectionresumeevent.md: id: d37e11432403 - last_write_checksum: sha1:d3ab000a0399a66cfbb35f1193515266cd36dea3 - pristine_git_object: 01b8a9998115162c023a0de4461011f9f1166ecf + last_write_checksum: sha1:68618643e9b86bea80bb64a25c5a31b3d0094574 + pristine_git_object: c751c1926617e8826a17bda3279fa485f444d072 docs/models/turndetectionstartevent.md: id: a91781cd3948 - last_write_checksum: sha1:26a4849778d1afc48f338f67ea6908eb89a9a38e - pristine_git_object: 54986b294af97962bbdc766e872f51c2e9ed45d5 + last_write_checksum: sha1:ded75d78672148237d713bf1a8bc026cc4df970f + pristine_git_object: 82836c12401cab0d20cf9f30fb117b89de3feb94 docs/models/unarchivemodelresponse.md: id: a690f43df567 last_write_checksum: sha1:5c9d4b78c92d30bb4835cb724d1ea22a19bf5327 @@ -5808,10 +5808,6 @@ trackedFiles: id: 528ecc78beed last_write_checksum: sha1:75fb3eb56cd5dcf1361947d6e5b2f84c90a89d7a pristine_git_object: d9afa1e292b3c0fe1c459943f085d3b007cce4f8 - docs/models/unregisterdeploymentv1ragdeploymentsdeploymentiddeleterequest.md: - id: 65f06ee99763 - last_write_checksum: sha1:436eec06a8de98fb86d3d63522412bb271b67764 - pristine_git_object: ff254bc835c0d86ddb19e2f93bd3876c7b5c1a7c docs/models/unscheduleworkflowv1workflowsschedulesscheduleiddeleterequest.md: id: 40615902c1fe last_write_checksum: sha1:d42a893a1c281ddfc8db957e168d832311917fe8 @@ -5850,8 +5846,8 @@ trackedFiles: pristine_git_object: 6b09e479247a14a4c4e5d4786c2705a8c01ba5c8 docs/models/updatedatasetrequest.md: id: c8f941dea81b - last_write_checksum: sha1:3b4276274ab943411faf51b2a788226f0ac8343d - pristine_git_object: 2a5194e493808629a9031f518a36bbe68d2c04a6 + last_write_checksum: sha1:3fd78a97e5fa0465ab69d60369c39200ccafb997 + pristine_git_object: b23f18f0ba8b813f94dc382eeb3b1de5e5fbd725 docs/models/updatedatasetv1observabilitydatasetsdatasetidpatchrequest.md: id: 4be4c812536f last_write_checksum: sha1:57fc7a42412f12ab8bbd16770fbe6cd1f08de659 @@ -5884,18 +5880,18 @@ trackedFiles: id: eff430149142 last_write_checksum: sha1:17a67bebe02789a158bc4b88e101ab4efe81c58e pristine_git_object: f111a3196933b4e7d691dbe207d283300c0ee014 - docs/models/updateindexmetricsv1ragdeploymentsdeploymentidmetricsputrequest.md: - id: 946de63fb8f9 - last_write_checksum: sha1:4dd29b3a567e2440d61b73c57adddd250a4dcd3e - pristine_git_object: 678b0ddd021b75828ed937c60d9b74e2ee13cebd docs/models/updateindexv1contextsearchindexesindexnameputrequest.md: id: 835e3e5d3d60 last_write_checksum: sha1:db0582cf9bee6d1c6134a056ac0f8763031903d9 pristine_git_object: d502f13650352681f87e551a8015f160e5d632c5 docs/models/updateinvocationbody.md: id: d8b3b9cca5ae - last_write_checksum: sha1:0fed6d77626ec76d3584e8d38b97ee228218a390 - pristine_git_object: e810a041e5db77f4d9396075b420600c1d86054d + last_write_checksum: sha1:a76d33b4ca05aef46c6ab460e0f86e25c653cca4 + pristine_git_object: b6731e0c5003d9658c5bd7bd4b6a6bac7bb0933a + docs/models/updateinvocationbodycallcontext.md: + id: 2a82f49dfd10 + last_write_checksum: sha1:cfdf082b6b9251334f0acaa1d55fa54535527ab0 + pristine_git_object: 64b36d129c0f5ad0ee8aaddfd80b77b615ba0c68 docs/models/updateinvocationbodyinput.md: id: 6c6c00bca06a last_write_checksum: sha1:604242fdb6f47c049b1e5afbe4ddd374a516cb98 @@ -5908,18 +5904,6 @@ trackedFiles: id: ef11bea7e0e7 last_write_checksum: sha1:4623eea4da7a40f08d537afd45a13fac97fa1572 pristine_git_object: e07cdb801c676826d411dd5c9dbfc326bf1a57cc - docs/models/updatemetricsrequestdeploymentmetricsoffline.md: - id: 269e475933a6 - last_write_checksum: sha1:74b8ac7a7dac34055604ff8307919eda0f233088 - pristine_git_object: 695a683a4e2b02e0b23529140a5309baf841b1f2 - docs/models/updatemetricsrequestdeploymentmetricsonline.md: - id: 76415d8a697d - last_write_checksum: sha1:5bdda0dc6da3de810c39c3b33f0df351f94bada6 - pristine_git_object: ba8ef4deea7d93ae601f32be94c6cf308831fd7e - docs/models/updatemetricsrequestindexmetrics.md: - id: 68e109bffb38 - last_write_checksum: sha1:22f6cbad5ec292f15b96809efa96d81d378dae56 - pristine_git_object: 6d97c8ef9a4993490afd1b1393f40db2e47f4431 docs/models/updatemodelrequest.md: id: 8eabdced3e0e last_write_checksum: sha1:96879df11c005b591f2e59975897feff8fc8656e @@ -6002,8 +5986,8 @@ trackedFiles: pristine_git_object: d46806d0f2f88a194dba7dacb4769822b831ccc0 docs/models/usageinfo.md: id: ec6fe65028a9 - last_write_checksum: sha1:19977a2bb11140ff61aaf762e5ebf8a60c8a050f - pristine_git_object: fb460774fe5e9affe5d1c0e6795ed6255cf06587 + last_write_checksum: sha1:964e4ac8eb1724d4a3d38fc150a76b9db99cafc0 + pristine_git_object: 9f3d7b1f3f14426062ac247d07f57f4b28ad180e docs/models/useridentity.md: id: 959b5b6bb365 last_write_checksum: sha1:57c19208b5cccac6058c850e34f98bdb7d6b04e9 @@ -6202,8 +6186,8 @@ trackedFiles: pristine_git_object: 23b8f1d005fcbb85ea564719cfa42d5d1bb1d83b docs/models/webhook.md: id: 20220f003054 - last_write_checksum: sha1:783109d30ae4deed9369e244810ec7ba7d1d665b - pristine_git_object: 8ab8c6bf93edacc20390c598a756d33c84d05716 + last_write_checksum: sha1:bc3f635520473b2dc962037b5505ad27a3e7bd54 + pristine_git_object: 9bb68ef647ba67ce17c2c524498ada2f81185094 docs/models/webhookprovider.md: id: df0553e72901 last_write_checksum: sha1:1a0de3c4bbd3a37926c7d13bcfb6eed2c587e09e @@ -6330,8 +6314,12 @@ trackedFiles: pristine_git_object: ac50a894e5290f07d8531e25663baae090cf533e docs/models/workflowexecutionrequest.md: id: 44a6d9ef046a - last_write_checksum: sha1:b5b91ad59a7f5000a934d4b859ce241659b031cc - pristine_git_object: c95a696ad7d7e85fbb09be85de36a414ca1d5136 + last_write_checksum: sha1:927e0361470afddf88293cc57573a3497f17f82e + pristine_git_object: e29c5cb6be311a775b8a5cc2ecc8f018d1014f4f + docs/models/workflowexecutionrequestcallcontext.md: + id: bfaee41a15aa + last_write_checksum: sha1:26cd5332237a5b08cad5964b9cb8c98fb81d40d3 + pristine_git_object: 17d021663a9eed31336908ce03023aa78b6dd5b3 docs/models/workflowexecutionresponse.md: id: 73595cfc443f last_write_checksum: sha1:9d298db95e511012a4e86507b92fc11e1ad31d43 @@ -6494,8 +6482,8 @@ trackedFiles: pristine_git_object: 376ae7e5517e0c725a762ac22252d88f02f55eab docs/sdks/agents/README.md: id: 5965d8232fd8 - last_write_checksum: sha1:645e61cc3ca3d1b8d3828b1d2ac0e7d552fb9ce4 - pristine_git_object: 939fd3ab70ccf0d7b5cb749c1b767c697353f2c0 + last_write_checksum: sha1:b43780e94dcd45b3ae64300d2b299bd77d9e26f9 + pristine_git_object: a6ce04b50c6b755faaaa76e88c1403efdbe06096 docs/sdks/audioagents/README.md: id: cc93a1f62aa8 last_write_checksum: sha1:41ac1613ae4e75a9e7f72875d255fb7f1365f4f8 @@ -6518,36 +6506,32 @@ trackedFiles: pristine_git_object: fd6111b2691a99f7461a9b028da3d37691be1322 docs/sdks/chat/README.md: id: 393193527c2c - last_write_checksum: sha1:210acdce4a5689f94fdd0bd76e3bee5c6a7def13 - pristine_git_object: 3a4fce38b522988a8c1cd70d52ad602f704374f3 + last_write_checksum: sha1:07d5a0024b1f43d7cfd50d316d485984374cb073 + pristine_git_object: aca36e50f285ab41729f1fa8229cec9334811e92 docs/sdks/classifiers/README.md: id: 74eb09b8d620 - last_write_checksum: sha1:d55829b4a7b0fa0c2c17af544e7960cf2550d138 - pristine_git_object: 7792679f1faf491d781fd2ec49ce3141d867fe84 + last_write_checksum: sha1:9d6cca59cf3da35d16d648fd6d5e9b8c40a0cbce + pristine_git_object: 170b2045a9be06d03ce381ed4d976982bae81e03 docs/sdks/connectors/README.md: id: 7633a87d946d last_write_checksum: sha1:8d53c6577c5bc00b71d229dad878b95c9063e89c pristine_git_object: 9360df154588f8c4eec8ef79727c2fbf9ff88ead - docs/sdks/contextsearchindexes/README.md: - id: 9f2adeab6c2a - last_write_checksum: sha1:6cc8f4ab9724655607e083658ad4cd1c8fc6a2dc - pristine_git_object: 2323736add5befaf7c46a0f94ee67ac51d3c904d docs/sdks/conversations/README.md: id: e22a9d2c5424 last_write_checksum: sha1:6df6eda9335bc4760668de7e6e4cfe4cad45349f pristine_git_object: 6c622ab41e6752efb8ee0c248d03cd843481f5b2 docs/sdks/datasets/README.md: id: deb5d90f4faf - last_write_checksum: sha1:45ab6bc1b755bbdc935227ec0fdf9957508abbd6 - pristine_git_object: cdfd6e98d60acd160561d1507547af96fd869647 + last_write_checksum: sha1:4519b1b9e553cdab967b486f3b29f3140c96c385 + pristine_git_object: 3720e25267be69772dd903b72675fb6cd2fd7d22 docs/sdks/datasetsrecords/README.md: id: 4907d0e941a0 last_write_checksum: sha1:bc6b4efd66707dbc847a4e371d1c5ef1b1ad5388 pristine_git_object: 0f2e1a1b4c6e67514318b0fb84544f46bcae9932 docs/sdks/deployments/README.md: id: e7c5559ab768 - last_write_checksum: sha1:6af53084e4bbbe8dc6b0a5bb6ccb206c73e70813 - pristine_git_object: 0465753b8a2e55c40a0fd8bb9a8e84c00f491c04 + last_write_checksum: sha1:07e4419850d35cec286cd0dac8063e8cb8e381ea + pristine_git_object: 0d54fdf2d4404ec7f5eb1b8d7f5fcd337ea02116 docs/sdks/documents/README.md: id: 9758e88a0a9d last_write_checksum: sha1:12786bc3bf23af2aa0db91a2956a04e3aba1fef3 @@ -6578,20 +6562,20 @@ trackedFiles: pristine_git_object: 77dceea21249821e97f061efaff961976ab91247 docs/sdks/executions/README.md: id: 401745b17323 - last_write_checksum: sha1:b5b4c1ae37c0ea9e78ac3c7cb582c967353582e9 - pristine_git_object: 144e7ca083c95ec131891d152913d0c652b8e20d + last_write_checksum: sha1:e016ed3a2973ecec159d4c64470910b241abf1cc + pristine_git_object: 0dcf5de1c282d20cd535b94c40064678d82d126d docs/sdks/files/README.md: id: e576d7a117f0 - last_write_checksum: sha1:84cf47f304ac542d40b0ed7c96af786a0d107e21 - pristine_git_object: 447b59e4a39a6667ec7be34825adbcaf98e7a0cb + last_write_checksum: sha1:6474dee0e174eec151fba63850f55c32ea2789c5 + pristine_git_object: 67ccb1342ef8a0dc5b4812fd6cb2bff2295b6b8e docs/sdks/fim/README.md: id: 499b227bf6ca last_write_checksum: sha1:2fbaba462120e71d11c71ca811c716ec98fb22af pristine_git_object: 2ad46f5b3f77b7deea7a7ce41200ee64aa9a3b59 docs/sdks/ingestionpipelineconfigurations/README.md: id: ead2af7afd1c - last_write_checksum: sha1:8c0d575d06925499e53bf7445a53627b4069be3b - pristine_git_object: 08ddfa65e93f663bfc084d0975b5c1bc8e519561 + last_write_checksum: sha1:8e2ec9ebc25e10fdaab7bf501fda19942a985d9a + pristine_git_object: e0ea6fa4dede0d394319a421efe8f387fb0ae7a2 docs/sdks/jobs/README.md: id: 7371cdc8b89a last_write_checksum: sha1:7730245c3bc8b8fc115db0b87c8b5f8c3bfa133e @@ -6620,10 +6604,6 @@ trackedFiles: id: 51c08468cf58 last_write_checksum: sha1:69e82f1f4bd4469161bade652211d3fcd82d6d54 pristine_git_object: 7bc76e3ec4da780ef5c3a268ba49b79dff339d7b - docs/sdks/ragsearchindexes/README.md: - id: 16979d558b1d - last_write_checksum: sha1:bf7d5389600d89e3bfc4cae06a6c0bc5e1df4332 - pristine_git_object: 3b21df3db7f52833bcab8b899e10377dc680eba2 docs/sdks/realtimesessions/README.md: id: 9ecc8ee669a5 last_write_checksum: sha1:1f1fc5e79cb6b6eccfe996dd25a72e3a36eeb3ee @@ -6640,6 +6620,10 @@ trackedFiles: id: 616147e9d77d last_write_checksum: sha1:c1e3de1cbb97788b21a0ed43605b40e3ef480bc1 pristine_git_object: 51eaf45ec72809afad6d8eacfa5f0c753bb3b5c3 + docs/sdks/searchindexes/README.md: + id: b58e7a6ab4f1 + last_write_checksum: sha1:6cc8f4ab9724655607e083658ad4cd1c8fc6a2dc + pristine_git_object: 2323736add5befaf7c46a0f94ee67ac51d3c904d docs/sdks/serviceaccounts/README.md: id: f172389e7190 last_write_checksum: sha1:8d033de91d95ce40f791f9406875c41e36265d97 @@ -6678,12 +6662,12 @@ trackedFiles: pristine_git_object: 7f0f7bba300c431693f86baa8ae7d053f8f45c4a docs/sdks/webhooks/README.md: id: e21b32d786a4 - last_write_checksum: sha1:d6f131ad5da6368c70d66e9ee3f531f7fa2ff7f5 - pristine_git_object: 3a119168ca3cf69ec06056c5f2754c0112a7946d + last_write_checksum: sha1:626a5135e967b8f541b2fda419fcfbdef7963f7e + pristine_git_object: 0e3c8fa04916387867cbcf807f2e15256e8a01e9 docs/sdks/workflows/README.md: id: 80c76ce944c0 - last_write_checksum: sha1:8e81d3853e7d30c7ca53c71f7fb314b9c877c9a1 - pristine_git_object: f151e5e1b29a0cc4d911b773360bc5fcbb22f289 + last_write_checksum: sha1:034c0367194e99fe72aae6b218a716a3f5d08fef + pristine_git_object: 35e6e904e52e62c570969cb2f23ac8566d3cab68 docs/sdks/workflowsevents/README.md: id: 514b42269280 last_write_checksum: sha1:9d6d71310e31cd0c9ad2cb060a6c99a8c0c99853 @@ -6726,8 +6710,8 @@ trackedFiles: pristine_git_object: 61e8b1db78103a97e2f7341901831a0ad13e42c3 src/mistralai/client/agents.py: id: e946546e3eaa - last_write_checksum: sha1:c3888537a6954b56aa1927b498da86c4ebbbf619 - pristine_git_object: 33c5dc7a4df43b29440c9dbad331ac8d7687f7fa + last_write_checksum: sha1:e72ca28f28793d5b1155ec45bfe2b523c057cd7b + pristine_git_object: 8c44f40992dde634ac7df77c7124b16d7006f630 src/mistralai/client/audio.py: id: 7a8ed2e90d61 last_write_checksum: sha1:fda6a0328013127fc2808df4541cacd5dda3dad4 @@ -6758,8 +6742,8 @@ trackedFiles: pristine_git_object: 60d085f5239bb5142bcd241428f62a1007eec24c src/mistralai/client/beta_context.py: id: 9760702adcf8 - last_write_checksum: sha1:eb9f1be7e6a3f09cc4897cbb55db12095eb43579 - pristine_git_object: d3776b5313ea3e147969ad48d76b8ae6821fcadc + last_write_checksum: sha1:b5731cd3e3520065edc1c9c67c1d48479303dced + pristine_git_object: a07deef42a99c47beca56eb52160368261b5c64e src/mistralai/client/beta_prompts.py: id: bb124f107a50 last_write_checksum: sha1:d4db5b7c176a0f65ef9bb023d26a06d41e2cbaf3 @@ -6770,44 +6754,40 @@ trackedFiles: pristine_git_object: 5458f3de6f59d1d1e70ec00fce9f2bb3551526c8 src/mistralai/client/chat.py: id: 7eba0f088d47 - last_write_checksum: sha1:91e3d0ff55629e9c06beeb3a3491d4a8017bb0d5 - pristine_git_object: 73136f81370480f8982f658a23379f1fd17782ef + last_write_checksum: sha1:7b0eca5f4ab8ccb7c0c36546f843a0eaa4670be1 + pristine_git_object: 21886dfe17d56af7f5f45568c602eb0da98e14b1 src/mistralai/client/classifiers.py: id: 26e773725732 - last_write_checksum: sha1:249e22ad7f9e92afeefc5502e2a94f9b9fc30d6a - pristine_git_object: aa0f29b1f1d3d5246c8f6a2d4a9720fa06ca3e83 + last_write_checksum: sha1:f3a44b88edcd3c31e6426dbe5a744281059cd6dd + pristine_git_object: 84e68f77fb94588c3ede02c86cada5f3e58456b3 src/mistralai/client/connectors.py: id: 39da03126050 last_write_checksum: sha1:48c873e6f7f81eca5a23603fb8c4b1ee3bf75efa pristine_git_object: bebe6b355723a609a1ea8e80b6fee063005cebe7 - src/mistralai/client/context_search_indexes.py: - id: 4ce058aafe7b - last_write_checksum: sha1:13cbaf8bf2dad7fbd887b7a21c0008143ed3294c - pristine_git_object: 6ceeb7e0e82376663a6e9bce4a3460347a7368d9 src/mistralai/client/conversations.py: id: 40692a878064 last_write_checksum: sha1:37a8e5b453f5cd77dac8cfec4e2a744285069aa1 pristine_git_object: 1f467f42010c82c01979af14ec2cab7c6e9838c1 src/mistralai/client/datasets.py: id: e5a6ae2a2d85 - last_write_checksum: sha1:157a8949ab6c389d39c722a5160fee0b865af32f - pristine_git_object: 57699f5c5228e7f5ddc5fb7827f355ee8a58c15d + last_write_checksum: sha1:161f29fcf78ac4e28b18c2376912afbfb13b86d1 + pristine_git_object: 9535bfd3274f6a55402648222a1db74c33bbb855 src/mistralai/client/datasets_records.py: id: 8857f490a224 last_write_checksum: sha1:c0d9dd99b6bec1fdd5d0d5cff9ab5645521c5be9 pristine_git_object: 045ef55c4cfd30e0ba2d01c33d297e534e140eb0 src/mistralai/client/deployments.py: id: a874b267fcb9 - last_write_checksum: sha1:4aa996557024c80db1fe90165a1429d79c5dd26e - pristine_git_object: 739eee2ccd06ffcdb3f33553fd5f31c09bddf929 + last_write_checksum: sha1:0bf73517441f0dbf195b50f0d2afe044467fee1b + pristine_git_object: d750bc750a467ba3c45eef9cfe605bca747feae1 src/mistralai/client/documents.py: id: bcc17286c31c last_write_checksum: sha1:a8cf00aa683204dc4cfd72d38debe6ab98dbc594 pristine_git_object: 79c01bdf55586340bb760e55235ddb49abe9dec5 src/mistralai/client/embeddings.py: id: f9c17258207e - last_write_checksum: sha1:671d79b0574e76ad814d359c0da453ddbd8cbe9e - pristine_git_object: 4f8388f1c34b234e24ffe6bfb42dea5375d45318 + last_write_checksum: sha1:37bae051dfd18bf8bd0ed5b8daa4cf3cb426b14d + pristine_git_object: 596828266f945d3e01cd70bd7b98300f214df19b src/mistralai/client/errors/__init__.py: id: 0b2db51246df last_write_checksum: sha1:b858e4440560a6458deabc922a1f875e0c9aedd1 @@ -6862,8 +6842,8 @@ trackedFiles: pristine_git_object: 3d5353d8691d30b0fdfe32ff9ce24e6b6b9dba30 src/mistralai/client/executions.py: id: 974004d347a2 - last_write_checksum: sha1:5babcdf1b2adff91de48adf0bd7dc0555da61415 - pristine_git_object: 84912c93738c13306038d4fb85821e3cc3f88654 + last_write_checksum: sha1:7b724cf56a4ef791b941720d00c45fa244dfb7c2 + pristine_git_object: 0d4c5b79eb23833b6311d782ed028c834b0160f7 src/mistralai/client/files.py: id: f12df4b2ce43 last_write_checksum: sha1:03955ac32e22fc67c3a029622ebdbd2b39040983 @@ -6878,8 +6858,8 @@ trackedFiles: pristine_git_object: 2b2e342b3ec61d354edd6e48b45c02da132b30b1 src/mistralai/client/ingestion_pipeline_configurations.py: id: f5a994272058 - last_write_checksum: sha1:6bc3aff0be9c1b5fe890394baba2d64ee68ce6f6 - pristine_git_object: b8f826ee4c213e4ba84cbab55a9d203dfd0d51f3 + last_write_checksum: sha1:266203c5284e2b175210381007fcc6c5b6f24abe + pristine_git_object: 56c18c3ba5efedc0674df400b87d3c060b2052fa src/mistralai/client/jobs.py: id: 22e6e695e52b last_write_checksum: sha1:ca5140d7dee16bb03a70be7c9d526f0e46df44e2 @@ -6898,8 +6878,8 @@ trackedFiles: pristine_git_object: 41d7f799e8a2afa860b4193f7752e094f1c624b2 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:f9716772e6e2ca37dc626e346799d507900da3c7 - pristine_git_object: 5d2eb48717a44404027689d5617940d0d0bdf094 + last_write_checksum: sha1:f375213274cdf4724029ea11c95588148d2870dd + pristine_git_object: 92ec99737b0f61d4b5823893730ab4067fa1e4ef src/mistralai/client/models/accepteddocumentresponse.py: id: f529b784daff last_write_checksum: sha1:2eb3c7dc0d7165987aefda841b1ceada6698c15d @@ -7050,12 +7030,12 @@ trackedFiles: pristine_git_object: 8bce3ce519a69a6d1cb36383b22fb801768c4868 src/mistralai/client/models/agentscompletionrequest.py: id: 3960bc4c545f - last_write_checksum: sha1:64c11394f14a3650b200b993c8d0ea11417a27ef - pristine_git_object: 41b3d95368b4201c7dbe05916aef5de266aa72af + last_write_checksum: sha1:0471bc3fe4385aeac242589b48aa77b8d8ef18f0 + pristine_git_object: 40cb9081972bc640a61425416cb039dd7e743d6d src/mistralai/client/models/agentscompletionstreamrequest.py: id: 1b73f90befc2 - last_write_checksum: sha1:081534565e82067913e08d19c6da7f3f199706f8 - pristine_git_object: ed37723eff958d5b210fe7459880ca0d87637e26 + last_write_checksum: sha1:a2c043a8ef339e5e1a0970e229964ec44394c0cd + pristine_git_object: 2bedb5c91f80b65a6e1e9fda9014aaae58352782 src/mistralai/client/models/aggregate_span_evaluations_v1_observability_spans_evaluations_aggregate_postop.py: id: 3fe59a78e3d0 last_write_checksum: sha1:ccad4fb2cf33965caf1d30f3116f8bff4d02481b @@ -7170,8 +7150,8 @@ trackedFiles: pristine_git_object: 8e05abcf56eb2c8bc00142d470fb5169ab162148 src/mistralai/client/models/audiochunk.py: id: ce5dce4dced2 - last_write_checksum: sha1:68938e8a655f212701e2c341cab8ad16a8c25f2c - pristine_git_object: 6d563417a6e30c6b6aa1eed9a9bd86e734603775 + last_write_checksum: sha1:a063c580f7ff697e1dfaddb405ec6ce6e28e548c + pristine_git_object: 119cb62f96a30d9898a3eb33af40863e9bf378ce src/mistralai/client/models/audiocontent.py: id: 8e39736e73f0 last_write_checksum: sha1:03c70873a1d5698232c2d5e90c4cf600772cf5d4 @@ -7390,8 +7370,8 @@ trackedFiles: pristine_git_object: d7156bedb40f6a933d6018952fbb5562f3ce9f4c src/mistralai/client/models/chatcompletionrequest.py: id: 9979805d8c38 - last_write_checksum: sha1:9b13331ab6d461a9135d3e65726561cd9b9639bb - pristine_git_object: 95899c05a71a46b484d702722119816b8a6ff879 + last_write_checksum: sha1:7eed4a8b112d5ed89371f6fa9317cb64553046f1 + pristine_git_object: 7725fd8d7d2285faf194031752bec776537afbd4 src/mistralai/client/models/chatcompletionresponse.py: id: 669d996b8e82 last_write_checksum: sha1:af8071e660b09437a32482cdb25fd07096edc080 @@ -7410,12 +7390,12 @@ trackedFiles: pristine_git_object: bd13a80f35538e6f5022aea567a76414d104c75b src/mistralai/client/models/chatcompletionstreamrequest.py: id: 18cb2b2415d4 - last_write_checksum: sha1:26959cf1f4794d114a1f5b27d707b94c98ae0c27 - pristine_git_object: e41f097a241aad4118a48cefd3fd88dcbdcef6d5 + last_write_checksum: sha1:ee93b05886921573fa134735cd1d433e87a8dc44 + pristine_git_object: a935022d0d12ca33ee55ee339f88cc3a7c770dd1 src/mistralai/client/models/chatmoderationrequest.py: id: 057aecb07275 - last_write_checksum: sha1:55fd2b53fd4b9e4ab3da4209846b65ceebcf8ff6 - pristine_git_object: 664349ec3948f178d5633cdef6011ceaaf740326 + last_write_checksum: sha1:9c71b0b44ffc5c40aa40d382e91b5a52d05b3b31 + pristine_git_object: cab5728719f77e225f150460f6411bb492e48384 src/mistralai/client/models/classificationrequest.py: id: 6942fe3de24a last_write_checksum: sha1:b44e6c950a199acaaa2a73c5f0ccc9c81c08decd @@ -7610,8 +7590,8 @@ trackedFiles: pristine_git_object: 0a8d6353eef6c8a88224e45d67f986f093fb082c src/mistralai/client/models/connectorerrorcode.py: id: d2c18b18bdbb - last_write_checksum: sha1:d1b215a50af8a79d5803c1e37b7099a5ac29240d - pristine_git_object: 327198099661bdd9851f472403daaa0461b9527d + last_write_checksum: sha1:d34882fc4019b345e5154c1f844546575e954e98 + pristine_git_object: 67a85ba5ee27d771c07bb07120111b042ef4f2a4 src/mistralai/client/models/connectorlocale.py: id: f987f5207d2e last_write_checksum: sha1:0faf0e888cd12eb5d3f8d2032143a3c02aa6f7c0 @@ -7732,6 +7712,10 @@ trackedFiles: id: 1ddc53a46c74 last_write_checksum: sha1:974f5389c3d9d98ff83fd8364003a0ba18cad6df pristine_git_object: 798cbc747879696af4cf075189208438c7362370 + src/mistralai/client/models/create_dataset_records_v1_observability_datasets_dataset_id_records_bulk_postop.py: + id: a3d9822feb26 + last_write_checksum: sha1:829ce56dd220729e4db9e7406c350e9aa31e2556 + pristine_git_object: 9faaedcb92014922499c64566c8d37299651a850 src/mistralai/client/models/create_index_v1_context_search_indexes_postop.py: id: 992fa61cb760 last_write_checksum: sha1:f683766e5961cf0008d8d2250c6ad5ed8caa0f1f @@ -7756,10 +7740,26 @@ trackedFiles: id: 9455e38a8c31 last_write_checksum: sha1:846a97a06677dddcb4cc0f290a256154a44507a7 pristine_git_object: bad696e1e16388408b3a15429f8beb1fe912d064 + src/mistralai/client/models/createdatasetrecordsitem.py: + id: b4087d48c7bc + last_write_checksum: sha1:aeb5eceb84b6c37f9a980bf1545eb2a3e8ee1e60 + pristine_git_object: 6970d95ef349dd602122e21a4e64ed4db270320f + src/mistralai/client/models/createdatasetrecordsrequest.py: + id: 3d76e7dd7880 + last_write_checksum: sha1:c89e8202b7c83a48cda706e9e4bf84f8f9ce6b9f + pristine_git_object: bd9139051bf3c20092b11c5e8a574e2982180ccd + src/mistralai/client/models/createdatasetrecordsresponse.py: + id: 15c1556e0bc6 + last_write_checksum: sha1:ec9f035bf457574535fe112046aada50503aafe6 + pristine_git_object: aa7e479370598d78cf26d89e69f5b4a09365d990 src/mistralai/client/models/createdatasetrequest.py: id: 046a094d3ef9 - last_write_checksum: sha1:f878d30cdebf517c7e7322017cd49e831f1867f7 - pristine_git_object: 0f2991f3a796db5a5fbfa5b7ccc7020a62651046 + last_write_checksum: sha1:89552750ac3c3d0af3c682ad20181776608396c6 + pristine_git_object: 4211aba52299eefc27aeab7ec81c8deba73195f4 + src/mistralai/client/models/createdeploymentarchiverequest.py: + id: ab8d6647b057 + last_write_checksum: sha1:a5cf973eb0b629e88bd18ef2e2a1ebde76936691 + pristine_git_object: a4023eb8a4670318870893d44f7a567ea79d8cb7 src/mistralai/client/models/createdeploymentrequest.py: id: 1ebab7ec18c6 last_write_checksum: sha1:d1dbb7b2ad193f3f89a0cbc3daacd0df2f989521 @@ -7774,8 +7774,8 @@ trackedFiles: pristine_git_object: 1a6f84410b85708fa021adcf66901dab42f913af src/mistralai/client/models/createingestionpipelineconfigurationrequest.py: id: 480f219c27e5 - last_write_checksum: sha1:6234b46bf6abeff0e65459530065de4a43406d44 - pristine_git_object: 10fe64193c628c607f8eb3b5720bb26995bb917a + last_write_checksum: sha1:8adf74a32b99f82357a2b7efade088b944de3b7f + pristine_git_object: b0a7d5ee85499a3f91bb4668a2960e8c650fd967 src/mistralai/client/models/createlibraryrequest.py: id: 1c489bec2f53 last_write_checksum: sha1:a93c3d16c45ba666c01a5b930f5aa117e7e5091f @@ -7838,8 +7838,8 @@ trackedFiles: pristine_git_object: 357297ea953718e2968389375368950c4040fe6a src/mistralai/client/models/createwebhook.py: id: 2d412260fe2e - last_write_checksum: sha1:c59f4a84c4a77a8ccf3fabd1933314ef21218b1a - pristine_git_object: 68cdec5a94ac69254f1e9666024362a2d9ea8511 + last_write_checksum: sha1:c97067f4297bc6de5139e70796d8b15c7d57fcab + pristine_git_object: 6260e40a4ec57ab308d0f16f0fd7b43f75bc7167 src/mistralai/client/models/credentialscreateorupdate.py: id: 9927546f2487 last_write_checksum: sha1:1b80bfded566798ee888dded057453b14b9b7c9e @@ -7914,8 +7914,8 @@ trackedFiles: pristine_git_object: 2319ebb11450321c74fd8bc5988723cee24fea37 src/mistralai/client/models/dataset.py: id: cbf14670ee00 - last_write_checksum: sha1:0b606aee15f2b2d494caadfe36af51fdde98eca0 - pristine_git_object: 6350b94105a61b6ac9d68f3da13b86bd48474241 + last_write_checksum: sha1:e391b8d302f23938c5cbf20d757c0c7e2d9901a4 + pristine_git_object: a9e148346e2dedab322a136ec35c50104271e2a4 src/mistralai/client/models/datasetimportresult.py: id: e85c28e35518 last_write_checksum: sha1:11d0abb7fd22e456bbf9dcc411505f664f992b41 @@ -7926,8 +7926,8 @@ trackedFiles: pristine_git_object: 8ac9ae02c01c17dc74f53336b9804e876ac96213 src/mistralai/client/models/datasetpreview.py: id: 128c29db3f37 - last_write_checksum: sha1:b0765baa67e373f1562151b178ce915170ea0c54 - pristine_git_object: 072906c8a3f2d0c75226f82900a4127d4520fda1 + last_write_checksum: sha1:06196c2ca75fc4c264ec7b67d769a3172a559045 + pristine_git_object: dbed3b69723d86eb2cfa2e2789309f775f6c2a19 src/mistralai/client/models/datasetrecord.py: id: 87ddebf2a0ce last_write_checksum: sha1:0dd33f49f15765ccabefe0cab5be602424d498c8 @@ -8036,6 +8036,10 @@ trackedFiles: id: a7a3d2ddaec6 last_write_checksum: sha1:03b1f68251d9b2aa44d1776bb311e0909015451a pristine_git_object: 11e3019bba67d63c7b3598d5ea52c917618917ca + src/mistralai/client/models/deploymentarchiveuploadresponse.py: + id: a1dff0d6459b + last_write_checksum: sha1:10fd69a1615ea463487ca38b3e9301d45edea65f + pristine_git_object: 666a06f3222134e4d6cbbd59e3e1b6565bf1e71c src/mistralai/client/models/deploymentbuildstate.py: id: 61e9001287f8 last_write_checksum: sha1:a1e76588c4d3118f3ab58d054ff79301b4fce090 @@ -8116,6 +8120,14 @@ trackedFiles: id: 6668b80e0502 last_write_checksum: sha1:e55300753eef9cea672199383c6f09d04a4ee9f6 pristine_git_object: 58016d5ffd19a4385226e8cc81d67644dc40deec + src/mistralai/client/models/displayformat.py: + id: 4d135d74fdf4 + last_write_checksum: sha1:9d153a9277b7551a7be1368265a7cbf15f61e0a8 + pristine_git_object: 95e81795a003cfe1b4592e7fc8b63fc52d0b79a3 + src/mistralai/client/models/displayspec.py: + id: 105007ae487f + last_write_checksum: sha1:b0eafe76f4d58544ecd260c99bc1505fda06bb52 + pristine_git_object: 8831d7ce683817f3af734f89a9f93bc7deb782e8 src/mistralai/client/models/distancemetric.py: id: 6b697e08cb8c last_write_checksum: sha1:1e9435a9de6b99f2bb1d13a3dcdd347bca5353e4 @@ -8160,10 +8172,14 @@ trackedFiles: id: 77f9526a78df last_write_checksum: sha1:962f629fa4ee8a36e731d33f8f730d5741a9e772 pristine_git_object: 26eee779e12ae8114a90d3f18f99f3dd50e46b9e + src/mistralai/client/models/embeddinginput.py: + id: 826494d7ec6f + last_write_checksum: sha1:43695ebe6d1ee934e977259840e811c1e03b0d37 + pristine_git_object: c3195de9d0395ca49d17131fc1ca5947ef6abd4f src/mistralai/client/models/embeddingrequest.py: id: eadbe3f9040c - last_write_checksum: sha1:ac0f8c249a0f6d58f76db8b58ccf1bbbea003ddd - pristine_git_object: 3568542b76c9a63c23d9fa142c21d39dcaa4e0eb + last_write_checksum: sha1:820b284465e65f6a9d6a05e3036be9e02483cd81 + pristine_git_object: 8c05efa5cd462ae8079a58e36dbc740b1dd98ee1 src/mistralai/client/models/embeddingresponse.py: id: f7d790e84b65 last_write_checksum: sha1:285531abf3a45de3193ed3c8b07818faac97eb32 @@ -8232,18 +8248,22 @@ trackedFiles: id: 62ba9c20e6f0 last_write_checksum: sha1:3e6761a412baacbd5fe2ad22c3dff6ef4e9a6005 pristine_git_object: 6113114aca94900351c6e7d13317b3e7022daa10 + src/mistralai/client/models/evaluationrunrunscorev2.py: + id: a3061a613af9 + last_write_checksum: sha1:fbf847bdf49a2ae06d09d3bec8f6dc9f37382763 + pristine_git_object: 2828a59c9ffb6105ef328a355f748e8aea3dc58e src/mistralai/client/models/evaluationrunscorev2.py: id: f7ab75e6cd88 last_write_checksum: sha1:63ec968b8f7a287c29a0517d3670d28a658e5e37 pristine_git_object: d5fe6b77709be60cbf48de3203aef0b6644c38e3 src/mistralai/client/models/evaluationrunv2response.py: id: 2b78bd73f956 - last_write_checksum: sha1:87e037ecb594efc910b030565a9136bf2cf36bc8 - pristine_git_object: 5fb958d69b042c4bb8ecb922b1feb50dad3be745 + last_write_checksum: sha1:3da8f60af2e89de9e0f32b56aeab8cfa6a962e6d + pristine_git_object: 46c0ecafcfb7782091c0bf959ff68429d06fb990 src/mistralai/client/models/evaluationrunv2withrefsresponse.py: id: 9f37bbc99595 - last_write_checksum: sha1:a2e84d40c719e033d2fa156a1abcfac10b2cf10f - pristine_git_object: 99e9fe212fe439f7ec2b97bf37db3d1c5e1f237d + last_write_checksum: sha1:8188f09b12b93e9586b4cd32c63ae7f4193dfb56 + pristine_git_object: 096b337d9e6af14fd58fdde1142d190b66d81d08 src/mistralai/client/models/evaluationsv2.py: id: 6d6d84cb7b61 last_write_checksum: sha1:ffaf263e89b86a9306dbf9694678258ca3622089 @@ -8258,8 +8278,8 @@ trackedFiles: pristine_git_object: 2073fcf9ff1b45a98eba228d09dd533c57207d7b src/mistralai/client/models/evaluatorv2.py: id: 7a1244da46fd - last_write_checksum: sha1:169da7b183d12047870dcb18a73b9a9cec1c3676 - pristine_git_object: c0eb73e29e801a44ab63b33b382d17fb00b44853 + last_write_checksum: sha1:6e4153c51bd1a2557386ed8fd68df2af5bc88586 + pristine_git_object: 39b9532b8e7dce0b36f81219698bdbfcbb657fe5 src/mistralai/client/models/eventprogressstatus.py: id: 48623263df72 last_write_checksum: sha1:fd2733c3772a53ef2de3a975c7395959750db86a @@ -8700,22 +8720,6 @@ trackedFiles: id: 0fb77fc9b49b last_write_checksum: sha1:3b046700334560597fdd79dd0efd6088e40837c5 pristine_git_object: f4a952505a26b56477978e4b5510c7d03cdb9da6 - src/mistralai/client/models/getdeploymentsummariesresponse.py: - id: 1a81c80026f1 - last_write_checksum: sha1:d0ae02fd51520317f3ceda7f7daceb58fbc84c95 - pristine_git_object: 579d926e6fd88c9394758c073b9163ee6a2ad809 - src/mistralai/client/models/getdeploymentsummariesresponsedeployment.py: - id: bfffc470b273 - last_write_checksum: sha1:e8bc5f49cf1f45710b0775191ae25b08c1a72518 - pristine_git_object: a45d7042b1a82ebf25ff8272b1389d158171b490 - src/mistralai/client/models/getdeploymentsummariesresponsevespadeployment.py: - id: 88b00f5b6d4d - last_write_checksum: sha1:7834caf09ec37e9d2c8fbe6fabc0609e7c466da8 - pristine_git_object: dbd93c0cd5da84a62fad3e94a2af59dbea3b9294 - src/mistralai/client/models/getdeploymentsummariesresponsevespaindex.py: - id: c11eec53891a - last_write_checksum: sha1:67f123f271119f3288cd09c346bfa42e741aab83 - pristine_git_object: 26582b5d4dc387807bd7f1afb39c88ff13fdf75c src/mistralai/client/models/getfileresponse.py: id: 81919086e371 last_write_checksum: sha1:8c1cba536fc5cf46349d8675d41e37d7452dd399 @@ -8818,8 +8822,8 @@ trackedFiles: pristine_git_object: 0c7def02441934bf38c29bfe86a3760f0d7a6801 src/mistralai/client/models/goalresult.py: id: 01eeda2dba33 - last_write_checksum: sha1:df1267c29ea7e5f273d792d28e9ce5fef1232d43 - pristine_git_object: 425ba55bb5b4b5fc79f92c3320f0ae896d8e9f8c + last_write_checksum: sha1:4a385cf5b42ca3681f8e1066a6c48f5e4ac8bd55 + pristine_git_object: ac342be44192451b847e2928c9f6e907c9c36a1c src/mistralai/client/models/goalresultitem.py: id: fe3fc1dc87ff last_write_checksum: sha1:94094902d96ae0014a39d61a1b72b2b078546263 @@ -8900,10 +8904,6 @@ trackedFiles: id: b2882fa57029 last_write_checksum: sha1:dfa43dcd8ececba5079b6f9f1dee539560386021 pristine_git_object: 97b126996ec8ff336a3238f5a99dbc3d9a503e10 - src/mistralai/client/models/importdatasetfromplaygroundrequest.py: - id: 8d809b14b144 - last_write_checksum: sha1:ba540fe973c1d984e757eda02339ba4eed8f80b7 - pristine_git_object: f83fcd70c177e78736eaaf5091f487ead5a5496b src/mistralai/client/models/importdatasetfromspansrequest.py: id: 977a46fb12f3 last_write_checksum: sha1:96a878a10a1ca188619a23f0a6c83e0b14315d79 @@ -8928,10 +8928,6 @@ trackedFiles: id: b4746c0f2c1c last_write_checksum: sha1:322fd7861d545a308bad5452f2d06d1714d6d7aa pristine_git_object: 1f7b4fc1daf676b8f22cbc00e78e390aa539d346 - src/mistralai/client/models/ingestionpipelinetargetindexref.py: - id: 1fd3655ff376 - last_write_checksum: sha1:a135893b21aea62f00a2db0c85540ff4c3702302 - pristine_git_object: 77bfc797aadffec460b2f9cbbcfcd771b17372fa src/mistralai/client/models/inputentries.py: id: 44727997dacb last_write_checksum: sha1:79691be9380b55ae2fc79da1fb92d125b35391f2 @@ -9452,6 +9448,14 @@ trackedFiles: id: 37663cc0cc75 last_write_checksum: sha1:d8b654ee4d25b3cf57869f1b16d3d44747bf30f2 pristine_git_object: a10565d4f933c94bdf8b6e1c065f6813a728fbfe + src/mistralai/client/models/metricdirectionspec.py: + id: c9116f6ea4bb + last_write_checksum: sha1:eda153e5dac406da96dafc538e18127d3dc6af0b + pristine_git_object: 552415fccaad26b9eab467c3b05ad47254969e0e + src/mistralai/client/models/missinggoalitem.py: + id: 1b880922f5f0 + last_write_checksum: sha1:62cf3def92c098e9ace221bebedb569b3d53fec8 + pristine_git_object: d729869a1d7e058d4e42ca9b4c5c1db9ef80ff14 src/mistralai/client/models/mistralembeddingmodel.py: id: 455e90b5dcfa last_write_checksum: sha1:c3c6b26f83f1d28912cbbaa44ba26b266adbeb36 @@ -9500,6 +9504,10 @@ trackedFiles: id: 132faad0549a last_write_checksum: sha1:697542db14505ecf59a83b25a38dc2bd92d5e5fa pristine_git_object: 91d021e8aec66fd3d7a41350c0ed539baf01c447 + src/mistralai/client/models/moderationrequest.py: + id: aa6d1e0d4069 + last_write_checksum: sha1:5eb9c71dc1eafc449dadb118eb59ab2c7f71735c + pristine_git_object: 0e17a4064ee895174ee5759c541f6848691e8305 src/mistralai/client/models/moderationresponse.py: id: 06bab279cb31 last_write_checksum: sha1:d31313c2164ecbc5a5714435a52b6f0dda87b8fe @@ -9550,12 +9558,12 @@ trackedFiles: pristine_git_object: fe63b087b92ddb7598ca3f057e62dbc8eac9e774 src/mistralai/client/models/oauth2authmethod.py: id: 32ceace54bd5 - last_write_checksum: sha1:09b477161b9681b22581698a7b4a4a74e68e7a5f - pristine_git_object: 72da2b89c8fd599bd082498bf7d1ee12c737c1e7 + last_write_checksum: sha1:a35a5705ac7596b9a9caf62c99ae3954ef39d04c + pristine_git_object: 17da698e3624c603f3645cadba358385b5d05b74 src/mistralai/client/models/oauth2authorizationcodeauthmethod.py: id: 087dcc1de885 - last_write_checksum: sha1:0d0b5f5799cf02a1abcd35a388ce3cc655555bc9 - pristine_git_object: e2cb69c71aab98f0d275e383534ae0af74a1df61 + last_write_checksum: sha1:b77d63bbf6adfe82b7e8a4c7cba51356e3e533f2 + pristine_git_object: c1de69a1475e0f8c3452eb66bfe43290eab305db src/mistralai/client/models/oauth2clientcredentialsauthmethod.py: id: ea742dee6af8 last_write_checksum: sha1:4f52943f4f6d7e3d210d3dccf56cb27eb0e62d42 @@ -9586,8 +9594,8 @@ trackedFiles: pristine_git_object: 91c2360d5d2c02e4391590a61ea4f6b0af5e24ec src/mistralai/client/models/observabilityerrorcode.py: id: ae572b470a30 - last_write_checksum: sha1:0a472cb40a3d3e2a96c543e4029349a62fbea2eb - pristine_git_object: 1565c182308fcc39294307769e44f8a78941d35b + last_write_checksum: sha1:3fb8bba32b306ae8fb4f9364e4b65c0d804ef76c + pristine_git_object: af065048975dd2233cf3880088ec2712770182e0 src/mistralai/client/models/observabilityerrordetail.py: id: cb6e8a484a38 last_write_checksum: sha1:19e8be8332f264eed6df5ca3125e3c396cce305d @@ -9872,10 +9880,6 @@ trackedFiles: id: 6e93e5363630 last_write_checksum: sha1:67b0b3dea78d58c52d20914ee34c821ea30d03f6 pristine_git_object: 2fd956b4690620fea76f77f63f8b55863759a44b - ? src/mistralai/client/models/post_dataset_records_from_playground_v1_observability_datasets_dataset_id_imports_from_playground_postop.py - : id: 09334d96c26d - last_write_checksum: sha1:d86d0bac82d2453d58fabb20360afcd2858bd447 - pristine_git_object: 0a58bbbf9597aea8f90aae3610c2109961ff997d src/mistralai/client/models/post_dataset_records_from_spans_v1_observability_datasets_dataset_id_imports_from_spans_postop.py: id: a362a57a5e98 last_write_checksum: sha1:8daa54c7ccb11aee03617376828c3303ba3a5642 @@ -9960,6 +9964,10 @@ trackedFiles: id: 15c552f53adf last_write_checksum: sha1:5074a3d11f007cd85f4f9ad93fcc9b9cbf7074a5 pristine_git_object: dd9d399302eaff26ea6c9a63a8b84179edc7fa91 + src/mistralai/client/models/prompttokensdetails.py: + id: e6be33f2cd2d + last_write_checksum: sha1:4e705372db66fb159644b9880b3d0e580211182b + pristine_git_object: 3f4412fda872f5a1d5a34bbd85819d9cff027fb3 src/mistralai/client/models/promptvariable.py: id: c86c2b89e3ce last_write_checksum: sha1:5a6d6b3ba2511eeabafd25ac313c7e25711064d8 @@ -10030,8 +10038,8 @@ trackedFiles: pristine_git_object: 5b0cf545ca115545d5f7eb0767a7f5d8138c027b src/mistralai/client/models/realtimespeechsession.py: id: 0b8c41568fce - last_write_checksum: sha1:6f42c090746ece0a65f9236a10b480e97482ab9c - pristine_git_object: fd9c2d24487e3ef28b6c8804ec072eb93aaf0f53 + last_write_checksum: sha1:2d8dd68820c3b007660bd5feed0ad02a89fc2e2d + pristine_git_object: b91e05b2998ec43833509f33e372e791b6f08265 src/mistralai/client/models/realtimespeechsessioncreated.py: id: 46cd4ef13e0e last_write_checksum: sha1:8d71e2a9f908011b04d6cbdd2adbe73e5861128e @@ -10046,8 +10054,8 @@ trackedFiles: pristine_git_object: a0f5a76075d0af926451cdc025fb7c704064ed13 src/mistralai/client/models/realtimespeechsessionupdatepayload.py: id: 3f0e12441b91 - last_write_checksum: sha1:b96d86e0016fe5e3662ff8518c12c715cdb2203b - pristine_git_object: 27972f5fea4333a84726121ee8658771d0033ed8 + last_write_checksum: sha1:4017b7496f8f0d695ab4a5c0f75a5c29a41cef33 + pristine_git_object: 755f1c56b43798c2acbd702fc417e568dd041bf8 src/mistralai/client/models/realtimespeechstreamingmode.py: id: ee52fdab8618 last_write_checksum: sha1:3702c8d3b3706fd1cac8eceaf7d6750b4fd443b3 @@ -10090,8 +10098,8 @@ trackedFiles: pristine_git_object: 6fc6e73fdd546b9c9cd4da36b4e9849e9188c709 src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py: id: 7033fdb33ad4 - last_write_checksum: sha1:4a150986e28c5e3c675eacd408a64de2b28ba967 - pristine_git_object: 02672880e1bf69f43dc7c26a4882904642a38169 + last_write_checksum: sha1:b4ef53046ee54ca594d5bcabbac54d7a45bb813a + pristine_git_object: eca4622816595465f643ca0b8c95a5a00c60a4dd src/mistralai/client/models/reasoningeffort.py: id: b930a0a20654 last_write_checksum: sha1:02c6faa2de9f084cfd8f90562c122a7986b3fa9e @@ -10104,26 +10112,6 @@ trackedFiles: id: 921acd3a224a last_write_checksum: sha1:14895aaaeed798a06a8e65095c030d760f525c4b pristine_git_object: 0f178f1ac5b1e7a66020e766240494d4ddcb0282 - src/mistralai/client/models/registerdeploymentrequestdeployment.py: - id: 9dcec21cfd06 - last_write_checksum: sha1:a690aed1050f7d2486b47339d433b758fc5f5f31 - pristine_git_object: d80301824d79061b3e395753aee3b49435ce02cd - src/mistralai/client/models/registerdeploymentrequestvespadeployment.py: - id: 002c9695c4b0 - last_write_checksum: sha1:3e6e685170797786cb4ebcdfc8dfca8cca94dc37 - pristine_git_object: f392f9248e95762fb903730d822d06b648a6b834 - src/mistralai/client/models/registerdeploymentrequestvespafield.py: - id: 4a62bce4e1d5 - last_write_checksum: sha1:d256e5c15f984e3366f72e5c2b3c569e871e1dba - pristine_git_object: f3ce76d67515aea13bcbfcbff31343f4934452ea - src/mistralai/client/models/registerdeploymentrequestvespaindex.py: - id: 2fb0584f27cf - last_write_checksum: sha1:96e8d6403321f7c65363e3889b64d5241c6c4099 - pristine_git_object: db291b85f2982236e7c9cdd398c21c3ea3b3c486 - src/mistralai/client/models/registersearchindexresponseindex.py: - id: e66c7b574b75 - last_write_checksum: sha1:0f9535013d2b0f0c9fb34458f44635adec3f5924 - pristine_git_object: cd4bced7cc810eb30d6f80978b54e67d2e319721 src/mistralai/client/models/registrysharingscope.py: id: c1151df8930f last_write_checksum: sha1:d4d8599ae87ab6c559e22712c8cf16ab016ae8b8 @@ -10178,8 +10166,8 @@ trackedFiles: pristine_git_object: 70ec5ca0d5315a7ab53bb9b94721b2afe71c9fbd src/mistralai/client/models/responseformat.py: id: 6ab8bc8d22c0 - last_write_checksum: sha1:6db31fa86436f34324d4f7d946f29c083027da5b - pristine_git_object: 52224e863103ba229906cda2ad53dc08108c8c6f + last_write_checksum: sha1:5c00e8540fbe761ed8c381544b428b44e2de5576 + pristine_git_object: f0f3358e646ff12dcbe360a541bba5219689c06f src/mistralai/client/models/responseformats.py: id: c4462a05fb08 last_write_checksum: sha1:863c7ec4c567d8f0c4e6305b47896424726e71be @@ -10462,8 +10450,8 @@ trackedFiles: pristine_git_object: 9a2b385bdaffc1830f9a053848a16cbf14a9dccc src/mistralai/client/models/scalarstatisticvalue.py: id: 53d8fc5c9129 - last_write_checksum: sha1:8a254db31bfdaf311032365b7a7ba75a1b7e41a6 - pristine_git_object: d517a796fe4ef45e850fa1b60120859cf99fd965 + last_write_checksum: sha1:eaf3972e04e8bc294f580b7c42e880e672c1bd3e + pristine_git_object: bf0364eed1f83e6bbf47f1dbba753bb7223ff34f src/mistralai/client/models/schedulecalendar.py: id: 76d72d187023 last_write_checksum: sha1:93ce464cb6d0a81f22da78acb129e41bb3beacb0 @@ -10500,22 +10488,6 @@ trackedFiles: id: 745d146d9413 last_write_checksum: sha1:7a83f773e8ffe138260347803f9fa2c2b19355f7 pristine_git_object: 787592312a16cb7b222a12a05925532cfced577d - src/mistralai/client/models/schemafielddatatype.py: - id: c391391d0988 - last_write_checksum: sha1:5a4688409bd510752b00ddc202d7c65e77eb6e14 - pristine_git_object: f2bd97282dce6efdde5e0cf3d75652187a54aad9 - src/mistralai/client/models/schemafieldindex.py: - id: 9501fc2b7fa1 - last_write_checksum: sha1:579b7ace6ff20ae3253e7931094c93065a7873bb - pristine_git_object: 62b1d17e2bef9be0d5065afcf1acded032974d8d - src/mistralai/client/models/schemafieldrankingtype.py: - id: a21364283a70 - last_write_checksum: sha1:014f29bbd5a3fa2a3a6f13cecf9c2c8564b178a8 - pristine_git_object: 9bde1b4f2e134a110bda8718e9054fdf51a39816 - src/mistralai/client/models/schemafieldstorage.py: - id: 6ec367e3cfe5 - last_write_checksum: sha1:ff5b04afcc4edaaa8baed301600002515e62b7f2 - pristine_git_object: 06d02c5b377e97a2e5fd19499ca68836afeb5a49 src/mistralai/client/models/scorefilter.py: id: 37e8ba001c45 last_write_checksum: sha1:a5d6994743002321030f0a4e54a241377e3ced15 @@ -10524,6 +10496,10 @@ trackedFiles: id: d9df4d33e34c last_write_checksum: sha1:d70c5446621824a7aff08726ba809e61075bd88b pristine_git_object: 93f71d073a1bd0947d94ae21ca91635902b7415b + src/mistralai/client/models/scoremetric.py: + id: 0cd5e54f63cf + last_write_checksum: sha1:543457de2258440c88ee9e0c07e7f890af1d7a87 + pristine_git_object: 16f5d3ecc9b47a44ba0502b5251bc27ecd0021a4 src/mistralai/client/models/scoreoperator.py: id: d68a3f194e69 last_write_checksum: sha1:17543366784da1342107db0cd6fecc404c6a1f2f @@ -10678,16 +10654,16 @@ trackedFiles: pristine_git_object: 5f1a94de33590f550c8aa5e8e74d9a40ab04bf52 src/mistralai/client/models/signalinvocationbody.py: id: 0fd96a7c058b - last_write_checksum: sha1:e957513389017f07405039c1af90cedbb2ac2e08 - pristine_git_object: 157a54607fd6189e077124c0bbf2c4c8d4dfa0f4 + last_write_checksum: sha1:232cfc4df606e616f93d4775e5ac443d7d4f866a + pristine_git_object: b0208b2e4b6502207d4bee2310dc34d58a94d398 src/mistralai/client/models/signalworkflowresponse.py: id: e1844a7da20b last_write_checksum: sha1:7708cf49d5c39b718710eaac6ccfe5da16569033 pristine_git_object: e1e4543f482c5c16f86a95d381a6f8fcdad155dc src/mistralai/client/models/simplenumericstatisticspec.py: id: 64ec4084d6d1 - last_write_checksum: sha1:fe4a65ad919930d8ac8e3622e9e86e40599b5a50 - pristine_git_object: 1f239b9e416e7fce12eb3772e79fe5369a53f7f5 + last_write_checksum: sha1:36c6c8a6452df533af1582c615dfb58eb5c0c8d7 + pristine_git_object: 5679fdf5129c3deeedae8342e63410598b6082f6 src/mistralai/client/models/sipdestination.py: id: 908615758d44 last_write_checksum: sha1:c1c12809859102704615a5816c6600360bb50655 @@ -11074,16 +11050,16 @@ trackedFiles: pristine_git_object: 03d69172e7a2bd853d162d697d8b60843285a893 src/mistralai/client/models/toolcall.py: id: fb34a1a3f3c2 - last_write_checksum: sha1:f9d8f80f13c0212b83f84e545f7107cdaa91292f - pristine_git_object: dd59f66d04de19d8e796350aceed2437aa950528 + last_write_checksum: sha1:fcccec97a068602a2cce6dd2af52c6f82695b2ce + pristine_git_object: 56c7cdb50e3353c832a153c6dcc74cb1681fcd15 src/mistralai/client/models/toolcallconfirmation.py: id: f2e953cfb4fe last_write_checksum: sha1:ce7164720f698c6bb17fb80353ca4fd16251df87 pristine_git_object: fda3da8ee9f44701c5c6782d18b2f72007abf71d src/mistralai/client/models/toolchoice.py: id: 14f7e4cc35b6 - last_write_checksum: sha1:603f41d13a618747cead3e0903b423a3599a64ff - pristine_git_object: b86a3a24f08f3690c79861c2c62366cb861cfff0 + last_write_checksum: sha1:f529bb516fc64bb03e6752662d35684381a4620e + pristine_git_object: 5257f9e2b23a9d6421c05576764f6321830445e2 src/mistralai/client/models/toolchoiceenum.py: id: c7798801f860 last_write_checksum: sha1:d958ef93b303539226fdab0fd46c8ea21d24cea2 @@ -11158,12 +11134,12 @@ trackedFiles: pristine_git_object: dc81aef2e4f469fee49a35b0b0ea876c410f5210 src/mistralai/client/models/transcriptionstreamevents.py: id: b50b3d74f16f - last_write_checksum: sha1:6fe4517a1e098c29dd8fdfcdd8e03ae2152acf0c - pristine_git_object: 4df0f982159a2ee3695729e468c0005ba814d1b9 + last_write_checksum: sha1:e3298108e1a618fa38d3fcc384a04395ffd20a2d + pristine_git_object: 895223b18cd08e253414270e1130ea8465c5512d src/mistralai/client/models/transcriptionstreameventtypes.py: id: 6f71f6fbf4c5 - last_write_checksum: sha1:d7671637063c19222c20b8334abf92abe3d30517 - pristine_git_object: cb6b288980f6e833d6486d9fe475a566760caa1f + last_write_checksum: sha1:557125da0e65df8f6aaf683489c1a352613234ee + pristine_git_object: 128199628014df66fc8b19df62ec7481151817fd src/mistralai/client/models/transcriptionstreamlanguage.py: id: e94333e4bc27 last_write_checksum: sha1:92b03df7667a97bf60367d156eec955039c891aa @@ -11238,24 +11214,24 @@ trackedFiles: pristine_git_object: 118251bddc3e7437b48a3aa1598bf25cf8d7b21f src/mistralai/client/models/turndetectioneagerendevent.py: id: 13888f3498f2 - last_write_checksum: sha1:edc18c69ec0c6222025e84b0384a22bd5a6d3544 - pristine_git_object: 1ffc4f94212ffcac9924a7cb5a72e9817f39b7b3 + last_write_checksum: sha1:104087fa9fb06c2999b1822e8d3e9f15a68661c7 + pristine_git_object: 4bedf9186ac83adac9380c015355f1f31139088e src/mistralai/client/models/turndetectionendevent.py: id: 134dffd6ec71 - last_write_checksum: sha1:ad4b94166ae3e0711316f58305d9fb22e9092433 - pristine_git_object: c6aa11339b4953ff6c78b827e7c0fefaa96c6747 + last_write_checksum: sha1:76ec79b129feb0099c412c083f5b2f368f15263a + pristine_git_object: bb7a9ac38d41d3007d0cf99806dedad78bf3e752 src/mistralai/client/models/turndetectionendreason.py: id: 8b5fd5ac04a3 - last_write_checksum: sha1:79911acdc96900a694b2538d3b111ef9939aa760 - pristine_git_object: fd69a5af08f9c152a6f7a391fdc561a54fd03ce9 + last_write_checksum: sha1:321c52dda13446d2601c1f94f80e1cce86a62df3 + pristine_git_object: 86a0800328c232d9130050b53e3fc6d47065a6a7 src/mistralai/client/models/turndetectionresumeevent.py: id: 2456ac1003c4 - last_write_checksum: sha1:0a115a8624f46b4b25848980210ad2a688973251 - pristine_git_object: b6e07a69bddcc4374d34ca635206a609bd87c8f2 + last_write_checksum: sha1:391e182b1d9af7eb283ca0cff8ff2c808f99b035 + pristine_git_object: 6f405ffbd23afe27bbe1197a677504c7c2d10070 src/mistralai/client/models/turndetectionstartevent.py: id: 6fffce8f94aa - last_write_checksum: sha1:546e5ca0f3280af4324d6f12ff6397e40b62a41f - pristine_git_object: 8b37f4930fbfe6d987643f703ed7722b1d7dd7dc + last_write_checksum: sha1:d40c973bf6e33086c49ab42bc44519b8b3acf0c4 + pristine_git_object: 7e88d9a61c6702794529c47614ff706d6c962b09 src/mistralai/client/models/unarchive_workflow_v1_workflows_workflow_identifier_unarchive_putop.py: id: 9df426343c2c last_write_checksum: sha1:0910779e5755b77e6d2ff78f469416ec4ba2e3b5 @@ -11268,10 +11244,6 @@ trackedFiles: id: 7bca8ab027ef last_write_checksum: sha1:37d5bc2ab820c72eb44cb5e3be7134a4d22b027a pristine_git_object: 45ff1b3e71c2ac12031454e8ce0f0f5303309c61 - src/mistralai/client/models/unregister_deployment_v1_rag_deployments_deployment_id_deleteop.py: - id: f26a43e68fa6 - last_write_checksum: sha1:c6a09d5cf0ac17360dabc70f9599a2c063abdc11 - pristine_git_object: 4a33c7f273b4ff85aa19e8816ddbb53a9224c88c src/mistralai/client/models/unschedule_workflow_v1_workflows_schedules_schedule_id_deleteop.py: id: 114f67717003 last_write_checksum: sha1:6b6ed1621d228d94cad32d2ac27f093c4489747a @@ -11300,10 +11272,6 @@ trackedFiles: id: 10af4960601c last_write_checksum: sha1:48d4a857bbe3181bed481e00b904f43a923fb268 pristine_git_object: 83479f1e212b4c9b8bb23583ba28ff4597d13fa5 - src/mistralai/client/models/update_index_metrics_v1_rag_deployments_deployment_id_metrics_putop.py: - id: 6c5dcb958c34 - last_write_checksum: sha1:76a5930bfb707d2788fd2eddf3ce1eaed816f137 - pristine_git_object: 499ed3703dd5ef6d986a047284224e28d0d6663f src/mistralai/client/models/update_index_v1_context_search_indexes_index_name_putop.py: id: cc9917096f16 last_write_checksum: sha1:62ef630f8d993a3939d253ec192e769caad96a21 @@ -11354,8 +11322,8 @@ trackedFiles: pristine_git_object: fae76d5e5a5838f04f4e84fd5d46ccf9a8f10b95 src/mistralai/client/models/updatedatasetrequest.py: id: bbb067caa23f - last_write_checksum: sha1:5abbbcb92bd6074ce4c4785bc16c6e812d4ffd41 - pristine_git_object: 5920f5727d3fccfba568b415feab2fb49afef8dc + last_write_checksum: sha1:444f1e62fe91c5a4d6e80cf4b5a0c30fb549fbd6 + pristine_git_object: 78cad47e3f1c56d2fb80235d8c8a21857fcdc9f1 src/mistralai/client/models/updatedefinition.py: id: 143f97683a02 last_write_checksum: sha1:55aacbfbc27d29d523a9546a286a72d2af33168b @@ -11374,8 +11342,8 @@ trackedFiles: pristine_git_object: 210468dca77c8965d7b69ef2a19994efc81ef875 src/mistralai/client/models/updateinvocationbody.py: id: b8558eff0be0 - last_write_checksum: sha1:df101b7db26b6a37d627ac1efc11baa1fb6d753f - pristine_git_object: 12dd0a8ca5fd1abd6d8828326994a46a72fb1c25 + last_write_checksum: sha1:ac7f132c0d2ffb38a288e85618e4e3eb10c7b708 + pristine_git_object: 078f6d99feffae5ea1ba218158999f01ac3571b6 src/mistralai/client/models/updatelibraryrequest.py: id: 51bc63885337 last_write_checksum: sha1:6783c849ce626834146153bbffb22ef35544c467 @@ -11384,18 +11352,6 @@ trackedFiles: id: a6a3d781827d last_write_checksum: sha1:08919d1698a2f43208e4d932d117f51256f3c023 pristine_git_object: 675e6be342fb97e78ca92e2ffa733968857dcb0d - src/mistralai/client/models/updatemetricsrequestdeploymentmetricsoffline.py: - id: 7e7972591620 - last_write_checksum: sha1:56d967efa11ca9c7ee44adf26b79fa3bfa511326 - pristine_git_object: b1fa42167b42335f86bb59292b7f03b83a2f48e8 - src/mistralai/client/models/updatemetricsrequestdeploymentmetricsonline.py: - id: 56bb6df51918 - last_write_checksum: sha1:055a462310064615a02f50327d861757dbf1338f - pristine_git_object: c099f60d985998c50e419d349b0d3ea811c12533 - src/mistralai/client/models/updatemetricsrequestindexmetrics.py: - id: 070491b02fb5 - last_write_checksum: sha1:a780e819e4c36163fc85f5d0efae46225dbd0ce5 - pristine_git_object: f0c34210a61e2b3f6a3c758164176e4338000f6f src/mistralai/client/models/updatemodelrequest.py: id: fe649967751e last_write_checksum: sha1:81676b0babef643d05a605dc28b86546412a80d9 @@ -11426,8 +11382,8 @@ trackedFiles: pristine_git_object: 3fab43e8cccae62d789a54ec0bd251d9aff58d06 src/mistralai/client/models/usageinfo.py: id: 54adb9a3af16 - last_write_checksum: sha1:39ddcbeaaf1896215f7adcf48615e00bcede56f2 - pristine_git_object: 6ac2e7d5f40f4f0a784ff4fc17ceb0dc437eb9f0 + last_write_checksum: sha1:73a89c8f1b0bf87174aeec282cd833b492198ece + pristine_git_object: 19523c41ed64647f80a9b9196f8f4cf84a9622db src/mistralai/client/models/useridentity.py: id: 8b1effdfe1ba last_write_checksum: sha1:3aee0e7ad6f89091e7731728d91eca64f4951f2e @@ -11554,8 +11510,8 @@ trackedFiles: pristine_git_object: e882a157b2d23951127fa0002d34bd4d6be46ccb src/mistralai/client/models/webhook.py: id: 49d93e206d98 - last_write_checksum: sha1:2a75f8960df207f69ec76723e09f5fe16dda1da5 - pristine_git_object: 14c0505d9be73b175604ec02e7fad1616b731c8f + last_write_checksum: sha1:73f105b73f806eb83c27b93371046ec575c0c4c9 + pristine_git_object: 2d99c309b365a01e8c1492b7ecee2a1fab454ffe src/mistralai/client/models/webhookprovider.py: id: 542cbffe37bb last_write_checksum: sha1:0f9f29be45486371fa442e8857f01ec16044d0ba @@ -11678,8 +11634,8 @@ trackedFiles: pristine_git_object: 5c7b8af15ec3ba0d0d8c43b18fc7de206b7146c5 src/mistralai/client/models/workflowexecutionrequest.py: id: 806340497ed4 - last_write_checksum: sha1:1b08aa2fb8791240b79f6658d8d69f8842c47316 - pristine_git_object: ac3b49005de8a6da55e828c9af307aa71f7670cc + last_write_checksum: sha1:0260bfea4be2a9c471832c35fc79c481ef7209e2 + pristine_git_object: 949505af391998ea08bef964922ebda5a2e27ba9 src/mistralai/client/models/workflowexecutionresponse.py: id: 758786637be5 last_write_checksum: sha1:6251bfc4dbc74a6e7a56920cce4a73f76c136549 @@ -11854,12 +11810,8 @@ trackedFiles: pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 src/mistralai/client/rag.py: id: 2c2b641de1b6 - last_write_checksum: sha1:252cc4ac534081bf723be605cd4c28e2b5616d67 - pristine_git_object: 6381adae8fde71a0524ad30a0ae61c204ed4881e - src/mistralai/client/rag_search_indexes.py: - id: 1be866c27d7d - last_write_checksum: sha1:46eae6d6061000fa04329c0abbae59c05ea8f76f - pristine_git_object: 513d7c2c8c0685f7f0bad51e1dcf13e3d5c547ac + last_write_checksum: sha1:2d20e75bccd5e161656f328a09e0a51a177250e7 + pristine_git_object: 085c50dbe2bea1e65d5ec097d1a4455d4c3b72fd src/mistralai/client/realtime.py: id: 9d55a65b4bc9 last_write_checksum: sha1:bde4c6f342c4666bdc7f9aac5d0aa0f7eec4b9ad @@ -11888,6 +11840,10 @@ trackedFiles: id: b7dd68a0235e last_write_checksum: sha1:48e972ef8320f040615c204729cecbbabb28e1b0 pristine_git_object: d91c93e74a31a5231fbd647ae84e52b6c98e5ec9 + src/mistralai/client/search_indexes.py: + id: c5a0a7df993a + last_write_checksum: sha1:5b3d356332651d590e0ae4e8c027e815b9943f8c + pristine_git_object: 525e3cb3997cf6d4003b6b3907b1dd444e964544 src/mistralai/client/service_accounts.py: id: d4210b455fcf last_write_checksum: sha1:4a27eadd5b364d52e155baaea46a215b08de1cc1 @@ -12018,12 +11974,12 @@ trackedFiles: pristine_git_object: 7ff3371427b02fa529c032b96efbbe6267281f60 src/mistralai/client/webhooks.py: id: dce4e52bb6d9 - last_write_checksum: sha1:b7942f76c11bdedab3e485329575fbc81d55c258 - pristine_git_object: e6816115140708bb0019aaf2867272819b0be35a + last_write_checksum: sha1:9cefaed3e0fdf74d5aa38dfc31e2f32c9297fcec + pristine_git_object: e30e9f161ecec7e236152b35b4d7f0f8a3a34234 src/mistralai/client/workflows.py: id: e2a0381191f6 - last_write_checksum: sha1:41f2ec352848cb851f40afa27085f5986dcb107f - pristine_git_object: af7d9b3ce0b2b3a81b9b21f87b409dce493f9a47 + last_write_checksum: sha1:c6403fe129d14204437328c4a8dd592b0abc5f93 + pristine_git_object: dfa4ab94223e2feb5fd246045aafcf80faf2a503 src/mistralai/client/workflows_events.py: id: 6d4f674ce8ef last_write_checksum: sha1:132dcc7cb1c790a1d61c4cd4a38c6c1fa7bd5ac0 @@ -12268,7 +12224,7 @@ examples: application/json: {"id": "497f6eca-6276-4993-bfeb-53cbbbba6f09", "object": "file", "bytes": 13000, "created_at": 1716963433, "filename": "files_upload.jsonl", "purpose": "batch", "sample_type": "batch_result", "source": "upload"} userExample: requestBody: - multipart/form-data: {"visibility": "workspace", "file": "x-file: example.file"} + multipart/form-data: {"visibility": "workspace", "purpose": "batch", "file": "example.file"} responses: "200": application/json: {"id": "e85980c9-409e-4a46-9304-36588f6292b0", "object": "file", "bytes": 13000, "created_at": 1759500189, "filename": "example.file.jsonl", "purpose": "batch", "sample_type": "batch_request", "num_lines": 2, "mimetype": "application/jsonl", "source": "upload", "signature": "d4821d2de1917341"} @@ -16677,9 +16633,30 @@ examples: application/json: {"id": "4a147421-fd6b-4c9b-978a-0ea657b3b619", "status": "ended", "num_participants": 683727, "created_at": "2026-04-21T15:40:57.471Z"} "422": application/json: {} + create_dataset_records_v1_observability_datasets__dataset_id__records_bulk_post: + speakeasy-default-create-dataset-records-v1-observability-datasets-dataset-id-records-bulk-post: + parameters: + path: + dataset_id: "" + requestBody: + application/json: {"records": []} + responses: + "201": + application/json: {"records": [{"id": "e6b26be7-9e1c-4e19-9c15-7c9ce541f0c0", "created_at": "2026-09-07T10:22:54.368Z", "updated_at": "2026-02-21T05:13:52.431Z", "deleted_at": "2025-01-15T23:54:21.675Z", "dataset_id": "efbc1281-945c-485c-8b5d-4ba596d81fe5", "payload": {"key": "", "key1": "", "key2": ""}, "properties": {"key": "", "key1": "", "key2": ""}, "source": "TELEMETRY_SPAN"}]} + "400": + application/json: {"detail": {"message": "", "error_code": null}} + create_deployment_archive_v1_workflows_deployments_archives_post: + speakeasy-default-create-deployment-archive-v1-workflows-deployments-archives-post: + requestBody: + application/json: {"size": 911758} + responses: + "201": + application/json: {"archive_id": "c91c026a-20ca-4e2c-8121-cee84ab01c16", "upload_url": "https://improbable-aircraft.info", "upload_headers": {"key": "", "key1": ""}} + "422": + application/json: {} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `mistral.beta.observability.traces.aggregate()`: \n * `response.data[].metric_value.union(date-time)` **Added** (Breaking ⚠️)\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.aggregate()`: \n * `response.data[].metric_value.union(date-time)` **Added** (Breaking ⚠️)\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.aggregate_span_evaluations()`: \n * `response.data[].metric_value.union(date-time)` **Added** (Breaking ⚠️)\n * `error.detail.error_code` **Changed**\n* `mistral.beta.connectors.call_tool()`: `response.metadata.mcp_meta.structured_content` **Changed** (Breaking ⚠️)\n* `mistral.beta.connectors.create_credentials()`: \n * `request` **Changed** (Breaking ⚠️)\n * `error.status[401]` **Added**\n* `mistral.workflows.deployments.list_deployments()`: \n * `request.limit` **Changed** (Breaking ⚠️)\n * `response.deployments[].managed` **Changed**\n* `mistral.responses.create()`: \n * `request` **Changed**\n * `response` **Changed** (Breaking ⚠️)\n* `mistral.audio.agents.list_versions()`: `response.data[].configuration.tools[]` **Changed** (Breaking ⚠️)\n* `mistral.audio.agents.update()`: \n * `request.configuration.tools[]` **Changed** (Breaking ⚠️)\n * `response.configuration.tools[]` **Changed** (Breaking ⚠️)\n* `mistral.audio.agents.get()`: `response.configuration.tools[]` **Changed** (Breaking ⚠️)\n* `mistral.audio.agents.create()`: \n * `request.configuration.tools[]` **Changed** (Breaking ⚠️)\n * `response.configuration.tools[]` **Changed** (Breaking ⚠️)\n* `mistral.audio.agents.list()`: `response.data[].configuration.tools[]` **Changed** (Breaking ⚠️)\n* `mistral.audio.sessions.create()`: \n * `request.tools[]` **Changed** (Breaking ⚠️)\n * `response.function_tools[].filler` **Changed** (Breaking ⚠️)\n* `mistral.beta.webhooks.create()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response` **Changed**\n* `mistral.beta.observability.evaluations.runs.compute_statistics()`: `error.detail.error_code` **Changed**\n* `mistral.beta.connectors.get()`: `response.union(mcp).connection_preferences[].http_proxy_enabled` **Added**\n* `mistral.beta.observability.judges.delete()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.observability.judges.update()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.observability.judges.judge_conversation()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.observability.datasets.records.judge()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.conversations.start()`: \n * `request.tools[].union(connector).authorization` **Deprecated**\n* `mistral.beta.conversations.list()`: `response.[].union(ModelConversation).tools[].union(connector).authorization` **Deprecated**\n* `mistral.beta.conversations.get()`: `response.union(ModelConversation).tools[].union(connector).authorization` **Deprecated**\n* `mistral.beta.conversations.start_stream()`: \n * `request.tools[].union(connector).authorization` **Deprecated**\n* `mistral.beta.agents.create()`: \n * `request.tools[].union(connector).authorization` **Deprecated**\n * `response.tools[].union(connector).authorization` **Deprecated**\n* `mistral.beta.agents.list()`: `response.[].tools[].union(connector).authorization` **Deprecated**\n* `mistral.beta.agents.list_pages()`: `response.data[].tools[].union(connector).authorization` **Deprecated**\n* `mistral.beta.agents.get()`: `response.tools[].union(connector).authorization` **Deprecated**\n* `mistral.beta.agents.update()`: \n * `request.tools[].union(connector).authorization` **Deprecated**\n * `response.tools[].union(connector).authorization` **Deprecated**\n* `mistral.beta.agents.update_version()`: `response.tools[].union(connector).authorization` **Deprecated**\n* `mistral.beta.agents.list_versions()`: `response.[].tools[].union(connector).authorization` **Deprecated**\n* `mistral.beta.agents.get_version()`: `response.tools[].union(connector).authorization` **Deprecated**\n* `mistral.beta.observability.datasets.create()`: \n * `response.owner_type` **Added**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.list()`: \n * `response.datasets.results[].owner_type` **Added**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.fetch()`: \n * `response.owner_type` **Added**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.update()`: \n * `response.owner_type` **Added**\n * `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_file()`: \n * `response.creator_type` **Added**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_playground()`: \n * `response.creator_type` **Added**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_spans()`: \n * `response.creator_type` **Added**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_dataset_records()`: \n * `response.creator_type` **Added**\n * `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()`: \n * `response.creator_type` **Added**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.list_tasks()`: \n * `response.tasks.results[].creator_type` **Added**\n * `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.datasets.records.bulk_delete()`: `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* `mistral.beta.observability.evaluations.create_pipeline()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.list_pipelines()`: \n * `request` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.get_pipeline()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.update_pipeline()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.delete_pipeline()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.list()`: \n * `response.evaluations.results[].creator_type` **Added**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.get()`: \n * `response.creator_type` **Added**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.projects.list()`: \n * `response.projects.results[].creator_type` **Added**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.projects.get()`: \n * `response.creator_type` **Added**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.runs.search()`: \n * `response.runs.results[]` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.runs.search_all()`: \n * `response.runs.results[]` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.runs.get()`: \n * `response` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.runs.get_statistics()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.list()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.observability.evaluations.records.get()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.records.search()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.optimizations.list()`: \n * `response.optimizations.results[].creator_type` **Added**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.optimizations.get()`: \n * `response.creator_type` **Added**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.optimizations.list_trials()`: \n * `response.trials.results[].observations[].run` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.fetch()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.observability.logs.search()`: `error.detail.error_code` **Changed**\n* `mistral.chat.stream()`: \n * `request.tools[].union(connector).authorization` **Deprecated**\n* `mistral.beta.observability.traces.search()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.get_trace_fields()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.get_trace_by_id()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.get_trace_spans()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.fetch_options()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.get_span_by_id()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.search_spans()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.search_span_evaluations()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.search_latest_span_evaluations()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.search_pipeline_results()`: \n * `response.pipeline_results.results[]` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.list_span_fields()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.list_span_eval_fields()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.fetch_span_field_options()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.fetch_span_eval_field_options()`: `error.detail.error_code` **Changed**\n* `mistral.beta.connectors.create()`: \n * `response.union(mcp).connection_preferences[].http_proxy_enabled` **Added**\n * `error.status[400]` **Added**\n* `mistral.beta.connectors.list()`: `response.items[].union(http).connection_preferences[].http_proxy_enabled` **Added**\n* `mistral.beta.connectors.update_credentials()`: \n * `request.credentials.query_params` **Added**\n * `error.status[401]` **Added**\n* `mistral.beta.observability.logs.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.connectors.update()`: \n * `response.union(mcp).connection_preferences[].http_proxy_enabled` **Added**\n * `error.status[400]` **Added**\n* `mistral.beta.context.search_indexes.ingest_documents()`: `error.status[403]` **Added**\n* `mistral.beta.context.search_indexes.search()`: `error.status[429]` **Added**\n* `mistral.beta.triggers.create()`: `response.event_source` **Changed**\n* `mistral.beta.triggers.list()`: `response.[].event_source` **Changed**\n* `mistral.beta.triggers.get()`: `response.event_source` **Changed**\n* `mistral.beta.webhooks.list()`: `response.[]` **Changed**\n* `mistral.beta.observability.judges.create()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.webhooks.get()`: `response` **Changed**\n* `mistral.beta.users.whoami()`: `response.customer_id` **Added**\n* `mistral.audio.sessions.update()`: **Added**\n* `mistral.audio.sessions.get()`: `response.bridge_metadata` **Added**\n* `mistral.beta.billing.get_subscription()`: **Added**\n* `mistral.beta.billing.get_budget()`: **Added**\n* `mistral.beta.observability.spans.list_pipeline_result_fields()`: **Added**\n* `mistral.beta.observability.evaluations.scorers.update()`: **Added**\n* `mistral.beta.observability.evaluations.scorers.get()`: **Added**\n* `mistral.audio.agents.list_sessions()`: `response.data[].bridge_metadata` **Added**\n* `mistral.beta.observability.evaluations.scorers.create()`: **Added**\n* `mistral.responses.count_input_tokens()`: `request` **Changed**\n* `mistral.realtime.sessions.create()`: \n * `request.union(realtime).metadata` **Added**\n* `mistral.chat.complete()`: \n * `request.tools[].union(connector).authorization` **Deprecated**\n* `mistral.beta.observability.logs.fetch_options()`: `error.detail.error_code` **Changed**\n* `mistral.agents.complete()`: \n * `request.tools[].union(connector).authorization` **Deprecated**\n* `mistral.agents.stream()`: \n * `request.tools[].union(connector).authorization` **Deprecated**\n* `mistral.workflows.get_workflows()`: `request.exclude_tags` **Added**\n* `mistral.workflows.get_workflow_registrations()`: `request.exclude_tags` **Added**\n* `mistral.workflows.runs.list_runs()`: `request.exclude_workflow_tags` **Added**\n* `mistral.workflows.schedules.get_schedules()`: `response.schedules[].user_id` **Added**\n* `mistral.workflows.schedules.get_schedule()`: `response.user_id` **Added**\n* `mistral.beta.observability.evaluations.scorers.list()`: **Added**\n* `mistral.workflows.deployments.create_deployment()`: \n * `request.spec.repository_url` **Added**\n * `response` **Changed**\n* `mistral.workflows.deployments.update_deployment()`: \n * `request.spec.repository_url` **Added**\n * `response` **Changed**\n* `mistral.workflows.deployments.delete_deployment()`: `response` **Changed**\n* `mistral.workflows.deployments.get_deployment()`: `response.managed` **Changed**\n* `mistral.workflows.deployments.stop_deployment()`: `response` **Changed**\n* `mistral.workflows.deployments.start_deployment()`: `response` **Changed**\n* `mistral.workflows.deployments.restart_deployment()`: `response` **Changed**\n" +releaseNotes: "## Python SDK Changes:\n* `mistral.beta.rag.ingestion_pipeline_configurations.register()`: `request.target_indexes` **Removed** (Breaking ⚠️)\n* `mistral.beta.observability.datasets.create_records()`: **Added**\n* `mistral.workflows.deployments.create_deployment_archive()`: **Added**\n* `mistral.beta.observability.datasets.import_from_playground()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.rag.search_indexes.get_deployment_summaries()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.rag.search_indexes.register_deployment()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.rag.search_indexes.unregister_deployment()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.rag.search_indexes.update_index_metrics()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.observability.datasets.create()`: \n * `request.metadata` **Added**\n * `response.metadata` **Added**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.list()`: \n * `response.datasets.results[].metadata` **Added**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.fetch()`: \n * `response.metadata` **Added**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.update()`: \n * `request.metadata` **Added**\n * `response.metadata` **Added**\n * `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_file()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_spans()`: `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.datasets.records.bulk_delete()`: `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* `mistral.beta.observability.evaluations.create_pipeline()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.list_pipelines()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.get_pipeline()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.update_pipeline()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.delete_pipeline()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.get()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.projects.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.projects.get()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.runs.search()`: \n * `response.runs.results[]` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.runs.search_all()`: \n * `response.runs.results[]` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.runs.get()`: \n * `response` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.runs.get_statistics()`: \n * `response` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.runs.compute_statistics()`: \n * `response` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.records.get()`: \n * `response.output_record.generations[]` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.records.search()`: \n * `response.records.results[].output_record.generations[]` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.optimizations.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.optimizations.get()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.optimizations.list_trials()`: \n * `response.trials.results[].observations[].run` **Changed**\n * `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.scorers.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.scorers.create()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.scorers.get()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.evaluations.scorers.update()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.logs.search()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.logs.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.logs.fetch_options()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.search()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.aggregate()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.get_trace_fields()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.get_trace_by_id()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.get_trace_spans()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.fetch_options()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.traces.get_span_by_id()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.search_spans()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.aggregate()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.aggregate_span_evaluations()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.search_span_evaluations()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.search_latest_span_evaluations()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.search_pipeline_results()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.list_pipeline_result_fields()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.list_span_fields()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.list_span_eval_fields()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.fetch_span_field_options()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.spans.fetch_span_eval_field_options()`: `error.detail.error_code` **Changed**\n* `mistral.beta.connectors.create()`: \n * `request.union(mcp).auth_methods[].union(oauth2).union(authorization_code).token_endpoint_auth_method` **Added**\n * `error.code.enum(custom_connectors_disabled)` **Added**\n* `mistral.beta.connectors.create_credentials()`: `error.code.enum(custom_connectors_disabled)` **Added**\n* `mistral.beta.connectors.update_credentials()`: `error.code.enum(custom_connectors_disabled)` **Added**\n* `mistral.beta.connectors.update()`: \n * `request_body.union(mcp).auth_methods[].union(union (0)).union(oauth2).union(authorization_code).token_endpoint_auth_method` **Added**\n * `error.code.enum(custom_connectors_disabled)` **Added**\n* `mistral.beta.context.search_indexes.create()`: `error.status[503]` **Added**\n* `mistral.beta.context.search_indexes.list()`: `error` **Changed**\n* `mistral.beta.context.search_indexes.get()`: `error` **Changed**\n* `mistral.beta.context.search_indexes.update()`: `error` **Changed**\n* `mistral.beta.context.search_indexes.delete()`: `error` **Changed**\n* `mistral.beta.context.search_indexes.ingest_documents()`: `error.status[503]` **Added**\n* `mistral.beta.context.search_indexes.delete_documents()`: `error` **Changed**\n* `mistral.beta.context.search_indexes.search()`: `error` **Changed**\n* `mistral.beta.context.search_indexes.navigate()`: `error` **Changed**\n* `mistral.beta.context.search_indexes.read()`: `error` **Changed**\n* `mistral.beta.context.search_indexes.grep()`: `error` **Changed**\n* `mistral.beta.context.search_indexes.get_chunk()`: `error` **Changed**\n* `mistral.beta.context.search_indexes.get_index_summary()`: `error.status[503]` **Added**\n* `mistral.beta.context.search_indexes.generate_index_summary()`: `error.status[503]` **Added**\n* `mistral.beta.context.search_indexes.set_index_summary()`: `error.status[503]` **Added**\n* `mistral.beta.triggers.create()`: `response.event_source` **Changed**\n* `mistral.beta.triggers.list()`: `response.[].event_source` **Changed**\n* `mistral.beta.triggers.get()`: `response.event_source` **Changed**\n* `mistral.beta.webhooks.list()`: `response.[]` **Changed**\n* `mistral.beta.webhooks.create()`: \n * `request` **Changed**\n * `response` **Changed**\n* `mistral.beta.webhooks.get()`: `response` **Changed**\n* `mistral.audio.speech.complete()`: `response.[].data.union(speech.audio.done).usage.prompt_tokens_details` **Added**\n* `mistral.audio.transcriptions.complete()`: `response.usage.prompt_tokens_details` **Added**\n* `mistral.audio.transcriptions.stream()`: `response.[]` **Changed**\n* `mistral.chat.complete()`: \n * `request.messages[]` **Changed**\n * `response` **Changed**\n* `mistral.chat.stream()`: \n * `request.messages[]` **Changed**\n * `response.[].data` **Changed**\n* `mistral.fim.complete()`: `response` **Changed**\n* `mistral.fim.stream()`: `response.[].data` **Changed**\n* `mistral.agents.complete()`: \n * `request.messages[]` **Changed**\n * `response` **Changed**\n* `mistral.agents.stream()`: \n * `request.messages[]` **Changed**\n * `response.[].data` **Changed**\n* `mistral.embeddings.create()`: \n * `request.inputs` **Changed**\n * `response.usage.prompt_tokens_details` **Added**\n* `mistral.classifiers.moderate()`: `request.queries` **Added**\n* `mistral.classifiers.moderate_chat()`: \n * `request.inputs.union(Array<>)[]` **Changed**\n* `mistral.classifiers.classify_chat()`: \n * `request.input.union(InstructRequest).messages[]` **Changed**\n* `mistral.workflows.execute_workflow()`: `request.call_context` **Added**\n* `mistral.workflows.execute_workflow_registration()`: `request.call_context` **Added**\n* `mistral.workflows.executions.signal_workflow_execution()`: `request.call_context` **Added**\n* `mistral.workflows.executions.update_workflow_execution()`: `request.call_context` **Added**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index a4313e980..4ead36a4f 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -33,7 +33,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 3.8.0 + version: 3.9.0 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index b426d38b5..ee0971360 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - 1.0.0 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:6441873fab21311e396b17c3470a67ba76f56913be59c79268c323a00bb4eea4 - sourceBlobDigest: sha256:b411ae12070945d5822bc3e421566c8ffd00e28a234e3948b5ff41c1026836bd + sourceRevisionDigest: sha256:063546f721a2fa07d26e90fddc31f4317e9e337979736b3f218bd288ef275494 + sourceBlobDigest: sha256:299c23ba84cfb85774160e24158cc6de3ac1f34e974ec7d01ada86e9d3d540fa tags: - latest - 1.0.0 @@ -39,10 +39,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:6441873fab21311e396b17c3470a67ba76f56913be59c79268c323a00bb4eea4 - sourceBlobDigest: sha256:b411ae12070945d5822bc3e421566c8ffd00e28a234e3948b5ff41c1026836bd + sourceRevisionDigest: sha256:063546f721a2fa07d26e90fddc31f4317e9e337979736b3f218bd288ef275494 + sourceBlobDigest: sha256:299c23ba84cfb85774160e24158cc6de3ac1f34e974ec7d01ada86e9d3d540fa codeSamplesNamespace: mistral-openapi-python-code-samples - codeSamplesRevisionDigest: sha256:650e5e46f796ed806de0a697d0b8c705375ab2395cb22103d8ca67e30bff556f + codeSamplesRevisionDigest: sha256:d7e11d407412b2b3956e55036ba28180d7bdba0b1b8954238742b344546294da workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.807.0 diff --git a/AGENTS.md b/AGENTS.md index af974e0db..a3a65ec59 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -29,8 +29,29 @@ There are also package-specific ownership files: If a file is not listed in the relevant `.genignore` and it has the generated header, assume it should not be edited directly. +Custom SDK hooks are hand-written too, though the root `.genignore` does not list them: in `src/mistralai/client/_hooks/` +(and `packages/*/src/mistralai/*/client/_hooks/`), every file without the generated header, such as `registration.py` +and `custom_user_agent.py`. Speakeasy writes `registration.py` once and never overwrites it (the package `.genignore` +files also list it); `sdkhooks.py`, `types.py` and `__init__.py` carry the header and are regenerated. + ## PR Review Rule Of Thumb - Prefer PRs that change hand-owned files listed in `.genignore`. - Be skeptical of direct edits to generated SDK files under `src/`, `docs/`, or `packages/*/src/`. - If a generated file changed, look for the corresponding source/config change that explains the regeneration. + +## How a Change Reaches PyPI + +This directory is the source of truth; the public `mistralai/client-python` repository is a copy of it. Releasing +runs in the Buildkite pipeline `eng-sdk-codegen` in the dashboard monorepo, not in GitHub Actions: + +1. Regenerate: a cron every Friday at 06:17 UTC, or a manual build with `Action = regenerate`, runs Speakeasy on + `openapi/specs/v2/` and opens the rolling dashboard pull request from `sdk/regen-client-python`. Review and merge it. +2. Publish: a person starts a build with `Action = publish`, from the Buildkite UI or through the Buildkite API or + MCP with `action=publish`, `dry_run=false`, `clients=python` as build meta-data. It copies this directory into a + pull request on the `sdk-sync` branch of `mistralai/client-python`. Publishing never regenerates, so merge step 1 + first. +3. Merging that public pull request is the release: it publishes to PyPI. + +The full procedure, its options and its safety checks are in the dashboard skill +`openapi/.agents/skills/deploy-public-sdk/SKILL.md`. diff --git a/Makefile b/Makefile index bba024ad9..4e0aeee24 100644 --- a/Makefile +++ b/Makefile @@ -7,15 +7,15 @@ help: @echo " make update-speakeasy-version VERSION=x.y.z Update Speakeasy CLI version" @echo " make check-config Check gen.yaml against recommended defaults" @echo "" - @echo "Note: Production SDK generation is done via GitHub Actions:" - @echo " .github/workflows/sdk_generation_mistralai_sdk.yaml" + @echo "Note: Production SDK generation and release run in the Buildkite pipeline eng-sdk-codegen" + @echo " (dashboard monorepo); see openapi/.agents/skills/deploy-public-sdk/SKILL.md" # Generate all SDKs (main, Azure, GCP) generate: speakeasy run -t all # Test SDK generation locally. -# For production, use GitHub Actions: .github/workflows/sdk_generation_mistralai_sdk.yaml +# For production, use the Buildkite pipeline eng-sdk-codegen (see the help target). # This uses the Speakeasy CLI version defined in .speakeasy/workflow.yaml test-generate: speakeasy run --skip-versioning diff --git a/README-PYPI.md b/README-PYPI.md index a4f990daa..46d15f34f 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -234,7 +234,7 @@ with Mistral( res = mistral.files.upload(file={ "file_name": "example.file", "content": open("example.file", "rb"), - }, visibility="workspace") + }, visibility="workspace", purpose="batch") # Handle response print(res) @@ -259,7 +259,7 @@ async def main(): res = await mistral.files.upload_async(file={ "file_name": "example.file", "content": open("example.file", "rb"), - }, visibility="workspace") + }, visibility="workspace", purpose="batch") # Handle response print(res) @@ -577,23 +577,23 @@ print(res.choices[0].message.content) * [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#update) - Update a connector. * [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#delete) - Delete a connector. -### [Beta.Context.SearchIndexes](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md) - -* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#create) - Create a managed index -* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#list) - List managed indexes -* [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#get) - Get a managed index -* [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#update) - Update a managed index schema -* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#delete) - Delete a managed index -* [ingest_documents](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#ingest_documents) - Ingest documents into a managed index -* [delete_documents](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#delete_documents) - Delete documents from a managed index -* [search](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#search) - Search a managed index -* [navigate](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#navigate) - Navigate to adjacent chunks -* [read](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#read) - Read chunks within a span -* [grep](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#grep) - Grep for a pattern within a source -* [get_chunk](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#get_chunk) - Get a single chunk by id -* [get_index_summary](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#get_index_summary) - Get Managed Index Summary -* [generate_index_summary](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#generate_index_summary) - Generate a summary field for a managed index -* [set_index_summary](https://github.com/mistralai/client-python/blob/main/docs/sdks/contextsearchindexes/README.md#set_index_summary) - Set Managed Index Summary +### [Beta.Context.SearchIndexes](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md) + +* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#create) - Create a managed index +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#list) - List managed indexes +* [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#get) - Get a managed index +* [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#update) - Update a managed index schema +* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#delete) - Delete a managed index +* [ingest_documents](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#ingest_documents) - Ingest documents into a managed index +* [delete_documents](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#delete_documents) - Delete documents from a managed index +* [search](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#search) - Search a managed index +* [navigate](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#navigate) - Navigate to adjacent chunks +* [read](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#read) - Read chunks within a span +* [grep](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#grep) - Grep for a pattern within a source +* [get_chunk](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#get_chunk) - Get a single chunk by id +* [get_index_summary](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#get_index_summary) - Get Managed Index Summary +* [generate_index_summary](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#generate_index_summary) - Generate a summary field for a managed index +* [set_index_summary](https://github.com/mistralai/client-python/blob/main/docs/sdks/searchindexes/README.md#set_index_summary) - Set Managed Index Summary ### [Beta.Conversations](https://github.com/mistralai/client-python/blob/main/docs/sdks/conversations/README.md) @@ -647,8 +647,8 @@ print(res.choices[0].message.content) * [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#update) - Patch dataset * [list_records](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#list_records) - List existing records in the dataset * [create_record](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#create_record) - Add a record to the dataset +* [create_records](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#create_records) - Add several records to the dataset * [import_from_file](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#import_from_file) - Populate the dataset with records from an uploaded file -* [import_from_playground](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#import_from_playground) - Populate the dataset with records from playground conversations * [import_from_spans](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#import_from_spans) - Populate the dataset with records mapped from telemetry spans * [import_from_dataset_records](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#import_from_dataset_records) - Populate the dataset with records from another dataset * [export_to_jsonl](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#export_to_jsonl) - Export to the Files API and retrieve presigned URL to download the resulting JSONL file @@ -752,13 +752,6 @@ print(res.choices[0].message.content) * [register](https://github.com/mistralai/client-python/blob/main/docs/sdks/ingestionpipelineconfigurations/README.md#register) - Register Config * [update_run_info](https://github.com/mistralai/client-python/blob/main/docs/sdks/ingestionpipelineconfigurations/README.md#update_run_info) - Update Run Info -### [Beta.Rag.SearchIndexes](https://github.com/mistralai/client-python/blob/main/docs/sdks/ragsearchindexes/README.md) - -* [get_deployment_summaries](https://github.com/mistralai/client-python/blob/main/docs/sdks/ragsearchindexes/README.md#get_deployment_summaries) - Get Deployment Summaries -* [register_deployment](https://github.com/mistralai/client-python/blob/main/docs/sdks/ragsearchindexes/README.md#register_deployment) - Register (or re-register) a search index -* [unregister_deployment](https://github.com/mistralai/client-python/blob/main/docs/sdks/ragsearchindexes/README.md#unregister_deployment) - Unregister Deployment -* [update_index_metrics](https://github.com/mistralai/client-python/blob/main/docs/sdks/ragsearchindexes/README.md#update_index_metrics) - Update Index Metrics - ### [Beta.ServiceAccounts](https://github.com/mistralai/client-python/blob/main/docs/sdks/serviceaccounts/README.md) * [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/serviceaccounts/README.md#create) - Create Service Account @@ -890,6 +883,7 @@ print(res.choices[0].message.content) * [restart_deployment](https://github.com/mistralai/client-python/blob/main/docs/sdks/deployments/README.md#restart_deployment) - Restart Deployment * [list_deployment_workers](https://github.com/mistralai/client-python/blob/main/docs/sdks/deployments/README.md#list_deployment_workers) - List Deployment Workers * [get_deployment_archive](https://github.com/mistralai/client-python/blob/main/docs/sdks/deployments/README.md#get_deployment_archive) - Get Deployment Archive +* [create_deployment_archive](https://github.com/mistralai/client-python/blob/main/docs/sdks/deployments/README.md#create_deployment_archive) - Create Deployment Archive * [get_deployment_logs](https://github.com/mistralai/client-python/blob/main/docs/sdks/deployments/README.md#get_deployment_logs) - Get Deployment Logs * [stream_deployment_logs](https://github.com/mistralai/client-python/blob/main/docs/sdks/deployments/README.md#stream_deployment_logs) - Stream Deployment Logs @@ -1188,9 +1182,9 @@ 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 190 of 303 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 63 of 303 methods.* -* [`ConnectorErrorResponse`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/connectorerrorresponse.py): Applicable to 4 of 303 methods.* +* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 189 of 300 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 63 of 300 methods.* +* [`ConnectorErrorResponse`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/connectorerrorresponse.py): Applicable to 4 of 300 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 fbd825230..38873d9dc 100644 --- a/README.md +++ b/README.md @@ -234,7 +234,7 @@ with Mistral( res = mistral.files.upload(file={ "file_name": "example.file", "content": open("example.file", "rb"), - }, visibility="workspace") + }, visibility="workspace", purpose="batch") # Handle response print(res) @@ -259,7 +259,7 @@ async def main(): res = await mistral.files.upload_async(file={ "file_name": "example.file", "content": open("example.file", "rb"), - }, visibility="workspace") + }, visibility="workspace", purpose="batch") # Handle response print(res) @@ -577,23 +577,23 @@ print(res.choices[0].message.content) * [update](docs/sdks/connectors/README.md#update) - Update a connector. * [delete](docs/sdks/connectors/README.md#delete) - Delete a connector. -### [Beta.Context.SearchIndexes](docs/sdks/contextsearchindexes/README.md) - -* [create](docs/sdks/contextsearchindexes/README.md#create) - Create a managed index -* [list](docs/sdks/contextsearchindexes/README.md#list) - List managed indexes -* [get](docs/sdks/contextsearchindexes/README.md#get) - Get a managed index -* [update](docs/sdks/contextsearchindexes/README.md#update) - Update a managed index schema -* [delete](docs/sdks/contextsearchindexes/README.md#delete) - Delete a managed index -* [ingest_documents](docs/sdks/contextsearchindexes/README.md#ingest_documents) - Ingest documents into a managed index -* [delete_documents](docs/sdks/contextsearchindexes/README.md#delete_documents) - Delete documents from a managed index -* [search](docs/sdks/contextsearchindexes/README.md#search) - Search a managed index -* [navigate](docs/sdks/contextsearchindexes/README.md#navigate) - Navigate to adjacent chunks -* [read](docs/sdks/contextsearchindexes/README.md#read) - Read chunks within a span -* [grep](docs/sdks/contextsearchindexes/README.md#grep) - Grep for a pattern within a source -* [get_chunk](docs/sdks/contextsearchindexes/README.md#get_chunk) - Get a single chunk by id -* [get_index_summary](docs/sdks/contextsearchindexes/README.md#get_index_summary) - Get Managed Index Summary -* [generate_index_summary](docs/sdks/contextsearchindexes/README.md#generate_index_summary) - Generate a summary field for a managed index -* [set_index_summary](docs/sdks/contextsearchindexes/README.md#set_index_summary) - Set Managed Index Summary +### [Beta.Context.SearchIndexes](docs/sdks/searchindexes/README.md) + +* [create](docs/sdks/searchindexes/README.md#create) - Create a managed index +* [list](docs/sdks/searchindexes/README.md#list) - List managed indexes +* [get](docs/sdks/searchindexes/README.md#get) - Get a managed index +* [update](docs/sdks/searchindexes/README.md#update) - Update a managed index schema +* [delete](docs/sdks/searchindexes/README.md#delete) - Delete a managed index +* [ingest_documents](docs/sdks/searchindexes/README.md#ingest_documents) - Ingest documents into a managed index +* [delete_documents](docs/sdks/searchindexes/README.md#delete_documents) - Delete documents from a managed index +* [search](docs/sdks/searchindexes/README.md#search) - Search a managed index +* [navigate](docs/sdks/searchindexes/README.md#navigate) - Navigate to adjacent chunks +* [read](docs/sdks/searchindexes/README.md#read) - Read chunks within a span +* [grep](docs/sdks/searchindexes/README.md#grep) - Grep for a pattern within a source +* [get_chunk](docs/sdks/searchindexes/README.md#get_chunk) - Get a single chunk by id +* [get_index_summary](docs/sdks/searchindexes/README.md#get_index_summary) - Get Managed Index Summary +* [generate_index_summary](docs/sdks/searchindexes/README.md#generate_index_summary) - Generate a summary field for a managed index +* [set_index_summary](docs/sdks/searchindexes/README.md#set_index_summary) - Set Managed Index Summary ### [Beta.Conversations](docs/sdks/conversations/README.md) @@ -647,8 +647,8 @@ print(res.choices[0].message.content) * [update](docs/sdks/datasets/README.md#update) - Patch dataset * [list_records](docs/sdks/datasets/README.md#list_records) - List existing records in the dataset * [create_record](docs/sdks/datasets/README.md#create_record) - Add a record to the dataset +* [create_records](docs/sdks/datasets/README.md#create_records) - Add several records to the dataset * [import_from_file](docs/sdks/datasets/README.md#import_from_file) - Populate the dataset with records from an uploaded file -* [import_from_playground](docs/sdks/datasets/README.md#import_from_playground) - Populate the dataset with records from playground conversations * [import_from_spans](docs/sdks/datasets/README.md#import_from_spans) - Populate the dataset with records mapped from telemetry spans * [import_from_dataset_records](docs/sdks/datasets/README.md#import_from_dataset_records) - Populate the dataset with records from another dataset * [export_to_jsonl](docs/sdks/datasets/README.md#export_to_jsonl) - Export to the Files API and retrieve presigned URL to download the resulting JSONL file @@ -752,13 +752,6 @@ print(res.choices[0].message.content) * [register](docs/sdks/ingestionpipelineconfigurations/README.md#register) - Register Config * [update_run_info](docs/sdks/ingestionpipelineconfigurations/README.md#update_run_info) - Update Run Info -### [Beta.Rag.SearchIndexes](docs/sdks/ragsearchindexes/README.md) - -* [get_deployment_summaries](docs/sdks/ragsearchindexes/README.md#get_deployment_summaries) - Get Deployment Summaries -* [register_deployment](docs/sdks/ragsearchindexes/README.md#register_deployment) - Register (or re-register) a search index -* [unregister_deployment](docs/sdks/ragsearchindexes/README.md#unregister_deployment) - Unregister Deployment -* [update_index_metrics](docs/sdks/ragsearchindexes/README.md#update_index_metrics) - Update Index Metrics - ### [Beta.ServiceAccounts](docs/sdks/serviceaccounts/README.md) * [create](docs/sdks/serviceaccounts/README.md#create) - Create Service Account @@ -890,6 +883,7 @@ print(res.choices[0].message.content) * [restart_deployment](docs/sdks/deployments/README.md#restart_deployment) - Restart Deployment * [list_deployment_workers](docs/sdks/deployments/README.md#list_deployment_workers) - List Deployment Workers * [get_deployment_archive](docs/sdks/deployments/README.md#get_deployment_archive) - Get Deployment Archive +* [create_deployment_archive](docs/sdks/deployments/README.md#create_deployment_archive) - Create Deployment Archive * [get_deployment_logs](docs/sdks/deployments/README.md#get_deployment_logs) - Get Deployment Logs * [stream_deployment_logs](docs/sdks/deployments/README.md#stream_deployment_logs) - Stream Deployment Logs @@ -1188,9 +1182,9 @@ 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 190 of 303 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 63 of 303 methods.* -* [`ConnectorErrorResponse`](./src/mistralai/client/errors/connectorerrorresponse.py): Applicable to 4 of 303 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 189 of 300 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 63 of 300 methods.* +* [`ConnectorErrorResponse`](./src/mistralai/client/errors/connectorerrorresponse.py): Applicable to 4 of 300 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 43ad46463..35400c863 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1987,3 +1987,99 @@ Based on: - [python v3.8.0] . ### Releases - [PyPI v3.8.0] https://pypi.org/project/mistralai/3.8.0 - . + +## 2026-11-24 14:42:03 +### Generated SDK baseline differences +The published SDK or generator baseline differs from the baseline used by the OpenAPI changelog. + +
+Generated surface details + +#### Beta surface changes +Removed from the beta surface (122): +- `ContextSearchIndexes` +- `GetDeploymentSummariesResponse` +- `GetDeploymentSummariesResponseDeployment` +- `GetDeploymentSummariesResponseVespaDeployment` +- `GetDeploymentSummariesResponseVespaIndex` +- `ImportDatasetFromPlaygroundRequest` +- `IngestionPipelineTargetIndexRef` +- `PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequest` +- `RagSearchIndexes` +- `RegisterDeploymentRequestDeployment` +- `RegisterDeploymentRequestVespaDeployment` +- `RegisterDeploymentRequestVespaField` +- `RegisterDeploymentRequestVespaIndex` +- `RegisterSearchIndexResponseIndex` +- `UnknownGetDeploymentSummariesResponseDeploymentDeployment` +- `UnregisterDeploymentV1RagDeploymentsDeploymentIDDeleteRequest` +- `UpdateIndexMetricsV1RagDeploymentsDeploymentIDMetricsPutRequest` +- `UpdateMetricsRequestDeploymentMetricsOffline` +- `UpdateMetricsRequestDeploymentMetricsOnline` +- `UpdateMetricsRequestIndexMetrics` +- `CreateIngestionPipelineConfigurationRequest.target_indexes` +- `GetDeploymentSummariesResponse.deployments` +- `GetDeploymentSummariesResponseDeployment.created_at` +- `GetDeploymentSummariesResponseDeployment.creator_id` +- `GetDeploymentSummariesResponseDeployment.deployment` +- ...and 97 more + +Changed types or signatures in beta (10): +- `AudioChunk.type: Annotated[Annotated[Literal['input_audio'], AfterValidator(validate_const('input_audio'))], pydantic.Field(alias='type')] -> Annotated[Annotated[Optional[Literal['input_audio']], AfterValidator(validate_const('input_audio'))], pydantic.Field(alias='type')]` +- `BetaContext.search_indexes: ContextSearchIndexes -> SearchIndexes` +- `EvaluationRunV2Response.run_scores: Optional[Dict[str, EvaluationRunScoreV2]] -> Optional[Dict[str, EvaluationRunRunScoreV2]]` +- `EvaluationRunV2ResponseTypedDict.run_scores: NotRequired[Dict[str, EvaluationRunScoreV2TypedDict]] -> NotRequired[Dict[str, EvaluationRunRunScoreV2TypedDict]]` +- `EvaluationRunV2WithRefsResponse.run_scores: Optional[Dict[str, EvaluationRunScoreV2]] -> Optional[Dict[str, EvaluationRunRunScoreV2]]` +- `EvaluationRunV2WithRefsResponseTypedDict.run_scores: NotRequired[Dict[str, EvaluationRunScoreV2TypedDict]] -> NotRequired[Dict[str, EvaluationRunRunScoreV2TypedDict]]` +- `TurnDetectionEagerEndEvent.type: Annotated[Annotated[Optional[Literal['turn.eager_end']], AfterValidator(validate_const('turn.eager_end'))], pydantic.Field(alias='type')] -> Annotated[Annotated[Literal['turn.eager_end'], AfterValidator(validate_const('turn.eager_end'))], pydantic.Field(alias='type')]` +- `TurnDetectionEndEvent.type: Annotated[Annotated[Optional[Literal['turn.end']], AfterValidator(validate_const('turn.end'))], pydantic.Field(alias='type')] -> Annotated[Annotated[Literal['turn.end'], AfterValidator(validate_const('turn.end'))], pydantic.Field(alias='type')]` +- `TurnDetectionResumeEvent.type: Annotated[Annotated[Optional[Literal['turn.resume']], AfterValidator(validate_const('turn.resume'))], pydantic.Field(alias='type')] -> Annotated[Annotated[Literal['turn.resume'], AfterValidator(validate_const('turn.resume'))], pydantic.Field(alias='type')]` +- `TurnDetectionStartEvent.type: Annotated[Annotated[Optional[Literal['turn.start']], AfterValidator(validate_const('turn.start'))], pydantic.Field(alias='type')] -> Annotated[Annotated[Literal['turn.start'], AfterValidator(validate_const('turn.start'))], pydantic.Field(alias='type')]` +
+ +### API changes +#### Beta API changes + +- `sdk.beta.observability.datasets`: removed `import_from_playground()`; added `create_records()`. +- Removed beta operations: `sdk.beta.rag.search_indexes.get_deployment_summaries()`, `sdk.beta.rag.search_indexes.register_deployment()`, `sdk.beta.rag.search_indexes.unregister_deployment()`, and `sdk.beta.rag.search_indexes.update_index_metrics()`. +- Removed field `target_indexes` from request in `sdk.beta.rag.ingestion_pipeline_configurations.register()`. + +#### Added operations + +Stable: + +- `sdk.workflows.deployments.create_deployment_archive()` + + +#### Schema changes + +- Added response field `metadata` in `sdk.beta.observability.datasets.list()`, `sdk.beta.observability.datasets.create()`, `sdk.beta.observability.datasets.fetch()`, and `sdk.beta.observability.datasets.update()`. +- Added enum values `dataset_record_id_conflict` and `ocsf_not_enabled` across beta observability datasets, beta observability datasets records, beta observability evaluations, beta observability evaluations projects, beta observability evaluations runs, beta observability evaluations records, beta observability evaluations optimizations, beta observability evaluations scorers, beta observability logs, beta observability traces, beta observability spans (62 operations). +- Added request field `metadata` in `sdk.beta.observability.datasets.create()` and `sdk.beta.observability.datasets.update()`. +- Added response fields `display`, `goals`, `metric_directions`, `weight_key`, and `metrics` in `sdk.beta.observability.evaluations.runs.search()`, `sdk.beta.observability.evaluations.runs.search_all()`, `sdk.beta.observability.evaluations.runs.get()`, and `sdk.beta.observability.evaluations.optimizations.list_trials()`. +- Added response fields `missing` and `sample_count` across beta observability evaluations runs, beta observability evaluations records, beta observability evaluations optimizations (8 operations). +- Added request field `token_endpoint_auth_method` in `sdk.beta.connectors.create()` and `sdk.beta.connectors.update()`. +- Added enum value `custom_connectors_disabled` in `sdk.beta.connectors.create()`, `sdk.beta.connectors.create_credentials()`, `sdk.beta.connectors.update_credentials()`, and `sdk.beta.connectors.update()`. +- Added field `status[403]` across beta context search indexes (10 operations). +- Added field `status[503]` across beta context search indexes (15 operations). +- Added field `status[402]` in `sdk.beta.context.search_indexes.search()`. +- Added response fields `description` and `timestamp_pattern` across beta triggers, beta webhooks (6 operations). +- Added request fields `description` and `timestamp_pattern` in `sdk.beta.webhooks.create()`. +- Added response field `prompt_tokens_details` across audio speech, audio transcriptions, chat, FIM, agents, embeddings (10 operations). +- Added response variants `turn.eager_end`, `turn.end`, `turn.resume`, and `turn.start` in `sdk.audio.transcriptions.stream()`. +- Added response enum values `turn.eager_end`, `turn.end`, `turn.resume`, and `turn.start` in `sdk.audio.transcriptions.stream()`. +- Changed request fields `id` and `type` across chat, agents, classifiers (6 operations). +- Changed response fields `type` and `id` across chat, FIM, agents (6 operations). +- Added request variants `Array`, `AudioChunk`, and `ImageURLChunk` in `sdk.embeddings.create()`. +- Added request field `queries` in `sdk.classifiers.moderate()`. +- Changed request field `union(Array<>)[]` in `sdk.classifiers.moderate_chat()`. +- Added request field `call_context` in `sdk.workflows.execute_workflow()`, `sdk.workflows.execute_workflow_registration()`, `sdk.workflows.executions.signal_workflow_execution()`, and `sdk.workflows.executions.update_workflow_execution()`. + +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.807.0 (2.956.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v3.9.0] . +### Releases +- [PyPI v3.9.0] https://pypi.org/project/mistralai/3.9.0 - . diff --git a/USAGE.md b/USAGE.md index c92216498..66356b14c 100644 --- a/USAGE.md +++ b/USAGE.md @@ -74,7 +74,7 @@ with Mistral( res = mistral.files.upload(file={ "file_name": "example.file", "content": open("example.file", "rb"), - }, visibility="workspace") + }, visibility="workspace", purpose="batch") # Handle response print(res) @@ -99,7 +99,7 @@ async def main(): res = await mistral.files.upload_async(file={ "file_name": "example.file", "content": open("example.file", "rb"), - }, visibility="workspace") + }, visibility="workspace", purpose="batch") # Handle response print(res) diff --git a/docs/models/agentscompletionrequest.md b/docs/models/agentscompletionrequest.md index 607904111..5a0e4e028 100644 --- a/docs/models/agentscompletionrequest.md +++ b/docs/models/agentscompletionrequest.md @@ -3,32 +3,32 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. | | -| `stop` | [OptionalNullable[models.AgentsCompletionRequestStop]](../models/agentscompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | -| `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 | | -| `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.AgentsCompletionRequestTool](../models/agentscompletionrequesttool.md)] | :heavy_minus_sign: | N/A | | -| `tool_choice` | [Optional[models.AgentsCompletionRequestToolChoice]](../models/agentscompletionrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | -| `presence_penalty` | *OptionalNullable[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` | *OptionalNullable[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. | | -| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | -| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | -| `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | -| `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | -| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | -| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | -| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../models/requestedservicetier.md) | :heavy_minus_sign: | Determines whether to serve the request using priority or standard capacity. | | -| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. | | +| `stop` | [OptionalNullable[models.AgentsCompletionRequestStop]](../models/agentscompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `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 | | +| `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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt. | **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.AgentsCompletionRequestTool](../models/agentscompletionrequesttool.md)] | :heavy_minus_sign: | N/A | | +| `tool_choice` | [Optional[models.AgentsCompletionRequestToolChoice]](../models/agentscompletionrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | +| `presence_penalty` | *OptionalNullable[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` | *OptionalNullable[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. | | +| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | +| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | +| `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | +| `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | +| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../models/requestedservicetier.md) | :heavy_minus_sign: | Determines whether to serve the request using priority or standard capacity. | | +| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | \ No newline at end of file diff --git a/docs/models/agentscompletionrequesttoolchoice.md b/docs/models/agentscompletionrequesttoolchoice.md index 63b9dca9f..7f78a1ac8 100644 --- a/docs/models/agentscompletionrequesttoolchoice.md +++ b/docs/models/agentscompletionrequesttoolchoice.md @@ -3,15 +3,15 @@ ## Supported Types -### `models.ToolChoice` +### `models.ToolChoiceEnum` ```python -value: models.ToolChoice = /* values here */ +value: models.ToolChoiceEnum = /* values here */ ``` -### `models.ToolChoiceEnum` +### `models.ToolChoice` ```python -value: models.ToolChoiceEnum = /* values here */ +value: models.ToolChoice = /* values here */ ``` diff --git a/docs/models/agentscompletionstreamrequest.md b/docs/models/agentscompletionstreamrequest.md index 351d83873..f192beaa4 100644 --- a/docs/models/agentscompletionstreamrequest.md +++ b/docs/models/agentscompletionstreamrequest.md @@ -3,32 +3,32 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `stop` | [OptionalNullable[models.AgentsCompletionStreamRequestStop]](../models/agentscompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | -| `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 | | -| `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.AgentsCompletionStreamRequestTool](../models/agentscompletionstreamrequesttool.md)] | :heavy_minus_sign: | N/A | | -| `tool_choice` | [Optional[models.AgentsCompletionStreamRequestToolChoice]](../models/agentscompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | -| `presence_penalty` | *OptionalNullable[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` | *OptionalNullable[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. | | -| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | -| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | -| `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | -| `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | -| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | -| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | -| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../models/requestedservicetier.md) | :heavy_minus_sign: | Determines whether to serve the request using priority or standard capacity. | | -| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `stop` | [OptionalNullable[models.AgentsCompletionStreamRequestStop]](../models/agentscompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `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 | | +| `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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt. | **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.AgentsCompletionStreamRequestTool](../models/agentscompletionstreamrequesttool.md)] | :heavy_minus_sign: | N/A | | +| `tool_choice` | [Optional[models.AgentsCompletionStreamRequestToolChoice]](../models/agentscompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | +| `presence_penalty` | *OptionalNullable[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` | *OptionalNullable[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. | | +| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | +| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | +| `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | +| `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | +| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../models/requestedservicetier.md) | :heavy_minus_sign: | Determines whether to serve the request using priority or standard capacity. | | +| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | \ No newline at end of file diff --git a/docs/models/agentscompletionstreamrequesttoolchoice.md b/docs/models/agentscompletionstreamrequesttoolchoice.md index 4354523a7..184c45808 100644 --- a/docs/models/agentscompletionstreamrequesttoolchoice.md +++ b/docs/models/agentscompletionstreamrequesttoolchoice.md @@ -3,15 +3,15 @@ ## Supported Types -### `models.ToolChoice` +### `models.ToolChoiceEnum` ```python -value: models.ToolChoice = /* values here */ +value: models.ToolChoiceEnum = /* values here */ ``` -### `models.ToolChoiceEnum` +### `models.ToolChoice` ```python -value: models.ToolChoiceEnum = /* values here */ +value: models.ToolChoice = /* values here */ ``` diff --git a/docs/models/audiochunk.md b/docs/models/audiochunk.md index 1ba8b0f57..d0bfd6d98 100644 --- a/docs/models/audiochunk.md +++ b/docs/models/audiochunk.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `type` | *Literal["input_audio"]* | :heavy_check_mark: | N/A | -| `input_audio` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `type` | *Optional[Literal["input_audio"]]* | :heavy_minus_sign: | N/A | +| `input_audio` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/chatcompletionrequest.md b/docs/models/chatcompletionrequest.md index dff270737..34305bafd 100644 --- a/docs/models/chatcompletionrequest.md +++ b/docs/models/chatcompletionrequest.md @@ -3,35 +3,35 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions. | mistral-large-latest | -| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | -| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | -| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. | | -| `stop` | [OptionalNullable[models.ChatCompletionRequestStop]](../models/chatcompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | -| `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 | | -| `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.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` | *OptionalNullable[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` | *OptionalNullable[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. | | -| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | -| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | -| `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | -| `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | -| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | -| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | -| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | -| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../models/requestedservicetier.md) | :heavy_minus_sign: | Determines whether to serve the request using priority or standard capacity. | | -| `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions. | mistral-large-latest | +| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | +| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | +| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. | | +| `stop` | [OptionalNullable[models.ChatCompletionRequestStop]](../models/chatcompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `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 | | +| `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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt. | **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.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` | *OptionalNullable[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` | *OptionalNullable[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. | | +| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | +| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | +| `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | +| `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | +| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../models/requestedservicetier.md) | :heavy_minus_sign: | Determines whether to serve the request using priority or standard capacity. | | +| `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file diff --git a/docs/models/chatcompletionrequesttoolchoice.md b/docs/models/chatcompletionrequesttoolchoice.md index dc82a8ef9..728de8a6b 100644 --- a/docs/models/chatcompletionrequesttoolchoice.md +++ b/docs/models/chatcompletionrequesttoolchoice.md @@ -5,15 +5,15 @@ Controls which (if any) tool is called by the model. `none` means the model will ## Supported Types -### `models.ToolChoice` +### `models.ToolChoiceEnum` ```python -value: models.ToolChoice = /* values here */ +value: models.ToolChoiceEnum = /* values here */ ``` -### `models.ToolChoiceEnum` +### `models.ToolChoice` ```python -value: models.ToolChoiceEnum = /* values here */ +value: models.ToolChoice = /* values here */ ``` diff --git a/docs/models/chatcompletionstreamrequest.md b/docs/models/chatcompletionstreamrequest.md index e966bc1b8..435e924cf 100644 --- a/docs/models/chatcompletionstreamrequest.md +++ b/docs/models/chatcompletionstreamrequest.md @@ -3,35 +3,35 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions. | mistral-large-latest | -| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | -| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | -| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `stop` | [OptionalNullable[models.ChatCompletionStreamRequestStop]](../models/chatcompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | -| `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 | | -| `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.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` | *OptionalNullable[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` | *OptionalNullable[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. | | -| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | -| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | -| `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | -| `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | -| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | -| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | -| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | -| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../models/requestedservicetier.md) | :heavy_minus_sign: | Determines whether to serve the request using priority or standard capacity. | | -| `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions. | mistral-large-latest | +| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | +| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | +| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `stop` | [OptionalNullable[models.ChatCompletionStreamRequestStop]](../models/chatcompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `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 | | +| `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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt. | **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.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` | *OptionalNullable[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` | *OptionalNullable[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. | | +| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | +| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | +| `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | +| `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | +| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../models/requestedservicetier.md) | :heavy_minus_sign: | Determines whether to serve the request using priority or standard capacity. | | +| `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file diff --git a/docs/models/chatcompletionstreamrequesttoolchoice.md b/docs/models/chatcompletionstreamrequesttoolchoice.md index 43f3ca380..d9b50bf6b 100644 --- a/docs/models/chatcompletionstreamrequesttoolchoice.md +++ b/docs/models/chatcompletionstreamrequesttoolchoice.md @@ -5,15 +5,15 @@ Controls which (if any) tool is called by the model. `none` means the model will ## Supported Types -### `models.ToolChoice` +### `models.ToolChoiceEnum` ```python -value: models.ToolChoice = /* values here */ +value: models.ToolChoiceEnum = /* values here */ ``` -### `models.ToolChoiceEnum` +### `models.ToolChoice` ```python -value: models.ToolChoiceEnum = /* values here */ +value: models.ToolChoice = /* values here */ ``` diff --git a/docs/models/chatmoderationrequest.md b/docs/models/chatmoderationrequest.md index f252482db..c68774660 100644 --- a/docs/models/chatmoderationrequest.md +++ b/docs/models/chatmoderationrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `inputs` | [models.ChatModerationRequestInputs3](../models/chatmoderationrequestinputs3.md) | :heavy_check_mark: | Chat to classify | +| `inputs` | [models.ChatModerationRequestInputs3](../models/chatmoderationrequestinputs3.md) | :heavy_check_mark: | Chat to classify. | | `model` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/chatmoderationrequestinputs3.md b/docs/models/chatmoderationrequestinputs3.md index ff1c6ea32..69a8c6129 100644 --- a/docs/models/chatmoderationrequestinputs3.md +++ b/docs/models/chatmoderationrequestinputs3.md @@ -1,6 +1,6 @@ # ChatModerationRequestInputs3 -Chat to classify +Chat to classify. ## Supported Types diff --git a/docs/models/connectorerrorcode.md b/docs/models/connectorerrorcode.md index 1284fdcce..130cca1f4 100644 --- a/docs/models/connectorerrorcode.md +++ b/docs/models/connectorerrorcode.md @@ -17,3 +17,4 @@ This is an open enum. Unrecognized values will not fail type checks. - `"connectors_count_limit_reached"` - `"credentials_rejected"` - `"server_unreachable"` +- `"custom_connectors_disabled"` diff --git a/docs/models/createdatasetrecordsitem.md b/docs/models/createdatasetrecordsitem.md new file mode 100644 index 000000000..87f5cf474 --- /dev/null +++ b/docs/models/createdatasetrecordsitem.md @@ -0,0 +1,11 @@ +# CreateDatasetRecordsItem + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `payload` | Dict[str, *Any*] | :heavy_check_mark: | Caller-authored input object stored on a dataset record. | +| `properties` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `source` | [Optional[models.CreateDatasetRecordsItemSource]](../models/createdatasetrecordsitemsource.md) | :heavy_minus_sign: | Caller-declared channel that initiated record creation. This value does not certify that the payload is an unmodified copy of its source. | +| `id` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional client-generated record ID, to retry safely: a record with this ID that already exists in the dataset is returned as is instead of being created again. | \ No newline at end of file diff --git a/docs/models/createdatasetrecordsitemsource.md b/docs/models/createdatasetrecordsitemsource.md new file mode 100644 index 000000000..fbe61d232 --- /dev/null +++ b/docs/models/createdatasetrecordsitemsource.md @@ -0,0 +1,16 @@ +# CreateDatasetRecordsItemSource + +Caller-declared channel that initiated record creation. This value does not certify that the payload is an unmodified copy of its source. + +## Example Usage + +```python +from mistralai.client.models import CreateDatasetRecordsItemSource +value: CreateDatasetRecordsItemSource = "DIRECT_INPUT" +``` + + +## Values + +- `"DIRECT_INPUT"` +- `"TELEMETRY_SPAN"` diff --git a/docs/models/createdatasetrecordsrequest.md b/docs/models/createdatasetrecordsrequest.md new file mode 100644 index 000000000..f082a6d13 --- /dev/null +++ b/docs/models/createdatasetrecordsrequest.md @@ -0,0 +1,8 @@ +# CreateDatasetRecordsRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `records` | List[[models.CreateDatasetRecordsItem](../models/createdatasetrecordsitem.md)] | :heavy_check_mark: | Records to add. They are created together: if one is invalid, none is created. | \ No newline at end of file diff --git a/docs/models/createdatasetrecordsresponse.md b/docs/models/createdatasetrecordsresponse.md new file mode 100644 index 000000000..d707c5473 --- /dev/null +++ b/docs/models/createdatasetrecordsresponse.md @@ -0,0 +1,8 @@ +# CreateDatasetRecordsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `records` | List[[models.DatasetRecord](../models/datasetrecord.md)] | :heavy_check_mark: | The created records, in the request order. | \ No newline at end of file diff --git a/docs/models/postdatasetrecordsfromplaygroundv1observabilitydatasetsdatasetidimportsfromplaygroundpostrequest.md b/docs/models/createdatasetrecordsv1observabilitydatasetsdatasetidrecordsbulkpostrequest.md similarity index 79% rename from docs/models/postdatasetrecordsfromplaygroundv1observabilitydatasetsdatasetidimportsfromplaygroundpostrequest.md rename to docs/models/createdatasetrecordsv1observabilitydatasetsdatasetidrecordsbulkpostrequest.md index 08db8ad94..8105d5663 100644 --- a/docs/models/postdatasetrecordsfromplaygroundv1observabilitydatasetsdatasetidimportsfromplaygroundpostrequest.md +++ b/docs/models/createdatasetrecordsv1observabilitydatasetsdatasetidrecordsbulkpostrequest.md @@ -1,4 +1,4 @@ -# PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequest +# CreateDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsBulkPostRequest ## Fields @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | `dataset_id` | *str* | :heavy_check_mark: | Dataset UUID or workspace-scoped slug. UUID-shaped values are always interpreted as dataset IDs. | -| `import_dataset_from_playground_request` | [models.ImportDatasetFromPlaygroundRequest](../models/importdatasetfromplaygroundrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `create_dataset_records_request` | [models.CreateDatasetRecordsRequest](../models/createdatasetrecordsrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/createdatasetrequest.md b/docs/models/createdatasetrequest.md index d4c166436..0042baa99 100644 --- a/docs/models/createdatasetrequest.md +++ b/docs/models/createdatasetrequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | | `name` | *str* | :heavy_check_mark: | N/A | -| `description` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| `description` | *str* | :heavy_check_mark: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/createdeploymentarchiverequest.md b/docs/models/createdeploymentarchiverequest.md new file mode 100644 index 000000000..432c61463 --- /dev/null +++ b/docs/models/createdeploymentarchiverequest.md @@ -0,0 +1,10 @@ +# CreateDeploymentArchiveRequest + +The size of the gzipped tar a managed deployment will build from. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `size` | *int* | :heavy_check_mark: | Size of the gzipped tar in bytes, at most 256 MiB. The upload URL accepts exactly this size. | \ No newline at end of file diff --git a/docs/models/createingestionpipelineconfigurationrequest.md b/docs/models/createingestionpipelineconfigurationrequest.md index 96b788481..f6aeb2105 100644 --- a/docs/models/createingestionpipelineconfigurationrequest.md +++ b/docs/models/createingestionpipelineconfigurationrequest.md @@ -3,8 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `pipeline_composition` | Dict[str, *str*] | :heavy_minus_sign: | N/A | -| `target_indexes` | List[[models.IngestionPipelineTargetIndexRef](../models/ingestionpipelinetargetindexref.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `pipeline_composition` | Dict[str, *str*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/createwebhook.md b/docs/models/createwebhook.md index a8adb59d9..9588b1619 100644 --- a/docs/models/createwebhook.md +++ b/docs/models/createwebhook.md @@ -3,22 +3,24 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `provider` | [models.WebhookProvider](../models/webhookprovider.md) | :heavy_check_mark: | N/A | -| `owner_type` | [Optional[models.TriggersOwnerType]](../models/triggersownertype.md) | :heavy_minus_sign: | N/A | -| `name` | *str* | :heavy_check_mark: | Human-readable name for this webhook | -| `secret` | *OptionalNullable[str]* | :heavy_minus_sign: | Signing secret provided by the third-party provider | -| `encryption_key` | *OptionalNullable[str]* | :heavy_minus_sign: | Encryption key used to decrypt webhook payloads | -| `url_verification_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token the provider echoes back when verifying the URL. Required for WhatsApp (paste the same value in the Verify token field of the Meta App Dashboard), forbidden for other providers | -| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | -| `signature_hash_algorithm` | [OptionalNullable[models.WebhookSignatureHashAlgorithm]](../models/webhooksignaturehashalgorithm.md) | :heavy_minus_sign: | N/A | -| `signature_header_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `validity_period_second` | *OptionalNullable[int]* | :heavy_minus_sign: | Maximum allowed drift in seconds between the signed timestamp and reception time, eg 300 | -| `signature_extractor_regex` | *OptionalNullable[str]* | :heavy_minus_sign: | Regex to extract signature, eg sha256=(.*) | -| `timestamp_extractor_regex` | *OptionalNullable[str]* | :heavy_minus_sign: | Regex to extract the timestamp from the signature header, used as {timestamp}, eg t=([^,]+) | -| `signature_payload_pattern` | *OptionalNullable[str]* | :heavy_minus_sign: | Pattern for signature payload, eg {body} or {timestamp}.{body} | -| `signature_encoding` | [OptionalNullable[models.WebhookSignatureEncoding]](../models/webhooksignatureencoding.md) | :heavy_minus_sign: | N/A | -| `success_status_code` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `event_type_pattern` | *OptionalNullable[str]* | :heavy_minus_sign: | Pattern for the event type, with {body.} and {headers.} placeholders, eg {body.type} or {headers.X-GitHub-Event} | -| `event_id_pattern` | *OptionalNullable[str]* | :heavy_minus_sign: | Pattern for a unique event identifier used to deduplicate deliveries, with {body.} and {headers.} placeholders, eg {body.id} or {body.event_id}.{headers.X-Delivery-Id}. Defaults to a hash of the request body | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `provider` | [models.WebhookProvider](../models/webhookprovider.md) | :heavy_check_mark: | N/A | +| `owner_type` | [Optional[models.TriggersOwnerType]](../models/triggersownertype.md) | :heavy_minus_sign: | N/A | +| `name` | *str* | :heavy_check_mark: | Human-readable name for this webhook | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | What this webhook is used for | +| `secret` | *OptionalNullable[str]* | :heavy_minus_sign: | Signing secret provided by the third-party provider | +| `encryption_key` | *OptionalNullable[str]* | :heavy_minus_sign: | Encryption key used to decrypt webhook payloads | +| `url_verification_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token the provider echoes back when verifying the URL. Required for WhatsApp (paste the same value in the Verify token field of the Meta App Dashboard), forbidden for other providers | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `signature_hash_algorithm` | [OptionalNullable[models.WebhookSignatureHashAlgorithm]](../models/webhooksignaturehashalgorithm.md) | :heavy_minus_sign: | N/A | +| `signature_header_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `validity_period_second` | *OptionalNullable[int]* | :heavy_minus_sign: | Maximum allowed drift in seconds between the signed timestamp and reception time, eg 300 | +| `signature_extractor_regex` | *OptionalNullable[str]* | :heavy_minus_sign: | Regex to extract signature, eg sha256=(.*) | +| `timestamp_extractor_regex` | *OptionalNullable[str]* | :heavy_minus_sign: | Regex to extract the timestamp from the rendered timestamp_pattern (the signature header by default), used as {timestamp}, eg t=([^,]+). Defaults to the whole value when timestamp_pattern is set | +| `timestamp_pattern` | *OptionalNullable[str]* | :heavy_minus_sign: | Pattern for the timestamp used as {timestamp}, with {body.} and {headers.} placeholders, eg {headers.X-Slack-Request-Timestamp} or {body.webhookTimestamp}. Defaults to the signature header when timestamp_extractor_regex is set | +| `signature_payload_pattern` | *OptionalNullable[str]* | :heavy_minus_sign: | Pattern for signature payload, eg {body} or {timestamp}.{body} | +| `signature_encoding` | [OptionalNullable[models.WebhookSignatureEncoding]](../models/webhooksignatureencoding.md) | :heavy_minus_sign: | N/A | +| `success_status_code` | *OptionalNullable[int]* | :heavy_minus_sign: | HTTP status code returned for accepted deliveries, eg 200 | +| `event_type_pattern` | *OptionalNullable[str]* | :heavy_minus_sign: | Pattern for the event type, with {body.} and {headers.} placeholders, eg {body.type} or {headers.X-GitHub-Event} | +| `event_id_pattern` | *OptionalNullable[str]* | :heavy_minus_sign: | Pattern for a unique event identifier used to deduplicate deliveries, with {body.} and {headers.} placeholders, eg {body.id} or {body.event_id}.{headers.X-Delivery-Id}. Defaults to a hash of the request body | \ No newline at end of file diff --git a/docs/models/dataset.md b/docs/models/dataset.md index a7e7471db..5fa72c69d 100644 --- a/docs/models/dataset.md +++ b/docs/models/dataset.md @@ -14,4 +14,5 @@ | `description` | *str* | :heavy_check_mark: | N/A | | `owner_id` | *str* | :heavy_check_mark: | N/A | | `owner_type` | [Optional[models.PrincipalType]](../models/principaltype.md) | :heavy_minus_sign: | N/A | -| `workspace_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| `workspace_id` | *str* | :heavy_check_mark: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/datasetpreview.md b/docs/models/datasetpreview.md index 55c647fa0..09efd4564 100644 --- a/docs/models/datasetpreview.md +++ b/docs/models/datasetpreview.md @@ -14,4 +14,5 @@ | `description` | *str* | :heavy_check_mark: | N/A | | `owner_id` | *str* | :heavy_check_mark: | N/A | | `owner_type` | [Optional[models.PrincipalType]](../models/principaltype.md) | :heavy_minus_sign: | N/A | -| `workspace_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| `workspace_id` | *str* | :heavy_check_mark: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/deploymentarchiveuploadresponse.md b/docs/models/deploymentarchiveuploadresponse.md new file mode 100644 index 000000000..e7b668929 --- /dev/null +++ b/docs/models/deploymentarchiveuploadresponse.md @@ -0,0 +1,12 @@ +# DeploymentArchiveUploadResponse + +An empty archive, and where to upload the tarball a managed deployment then builds from. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `archive_id` | *str* | :heavy_check_mark: | Pass it as the spec's `archive_id` once the upload has finished. | +| `upload_url` | *str* | :heavy_check_mark: | A signed URL to PUT the tarball to. It grants write access, so keep it secret. | +| `upload_headers` | Dict[str, *str*] | :heavy_check_mark: | Headers the PUT must send for the signed URL to accept it. | \ No newline at end of file diff --git a/docs/models/displayformat.md b/docs/models/displayformat.md new file mode 100644 index 000000000..935093744 --- /dev/null +++ b/docs/models/displayformat.md @@ -0,0 +1,21 @@ +# DisplayFormat + +How an evaluator's numeric values render: ``percent``, ``integer`` or ``number``. + +## Example Usage + +```python +from mistralai.client.models import DisplayFormat + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: DisplayFormat = "number" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"number"` +- `"percent"` +- `"integer"` diff --git a/docs/models/displayspec.md b/docs/models/displayspec.md new file mode 100644 index 000000000..871c760aa --- /dev/null +++ b/docs/models/displayspec.md @@ -0,0 +1,21 @@ +# DisplaySpec + +How the UI renders an evaluator's numeric values (scores, score-scale statistics, goal thresholds). + +Display only: stored values and computed statistics never change. ``percent`` reads the value as a +fraction (0.63 renders as 63%), ``integer`` rounds it, ``number`` renders ``decimals`` decimals. +``unit`` is a free suffix ("s", "ms", "chars"), not allowed with ``percent`` (its ``%`` is the unit). +All fields unset = the default rendering. + +``metric`` (run evaluators only) names the run evaluator metric this format applies to. Without it, the +spec formats the main value and is the default format of every metric. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `format_` | [OptionalNullable[models.DisplayFormat]](../models/displayformat.md) | :heavy_minus_sign: | N/A | +| `unit` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `decimals` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `metric` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/embeddinginput.md b/docs/models/embeddinginput.md new file mode 100644 index 000000000..d3907bc27 --- /dev/null +++ b/docs/models/embeddinginput.md @@ -0,0 +1,23 @@ +# EmbeddingInput + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `models.ImageURLChunk` + +```python +value: models.ImageURLChunk = /* values here */ +``` + +### `models.AudioChunk` + +```python +value: models.AudioChunk = /* values here */ +``` + diff --git a/docs/models/embeddingrequest.md b/docs/models/embeddingrequest.md index 71d139cdf..6ff2c036e 100644 --- a/docs/models/embeddingrequest.md +++ b/docs/models/embeddingrequest.md @@ -7,7 +7,7 @@ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | | `model` | *str* | :heavy_check_mark: | ID of the model to use. | mistral-embed | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | -| `inputs` | [models.EmbeddingRequestInputs](../models/embeddingrequestinputs.md) | :heavy_check_mark: | Text to embed. | [
"Embed this sentence.",
"As well as this one."
] | | `output_dimension` | *OptionalNullable[int]* | :heavy_minus_sign: | The dimension of the output embeddings when feature available. If not provided, a default output dimension will be used. | | | `output_dtype` | [Optional[models.EmbeddingDtype]](../models/embeddingdtype.md) | :heavy_minus_sign: | N/A | | -| `encoding_format` | [Optional[models.EncodingFormat]](../models/encodingformat.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `encoding_format` | [Optional[models.EncodingFormat]](../models/encodingformat.md) | :heavy_minus_sign: | N/A | | +| `inputs` | [models.EmbeddingRequestInputs](../models/embeddingrequestinputs.md) | :heavy_check_mark: | Text to embed. | [
"Embed this sentence.",
"As well as this one."
] | \ No newline at end of file diff --git a/docs/models/embeddingrequestinputs.md b/docs/models/embeddingrequestinputs.md index a3f82c1c6..4d00efcd2 100644 --- a/docs/models/embeddingrequestinputs.md +++ b/docs/models/embeddingrequestinputs.md @@ -11,9 +11,27 @@ Text to embed. value: str = /* values here */ ``` +### `models.ImageURLChunk` + +```python +value: models.ImageURLChunk = /* values here */ +``` + +### `models.AudioChunk` + +```python +value: models.AudioChunk = /* values here */ +``` + ### `List[str]` ```python value: List[str] = /* values here */ ``` +### `List[models.EmbeddingInput]` + +```python +value: List[models.EmbeddingInput] = /* values here */ +``` + diff --git a/docs/models/evaluationrunrunscorev2.md b/docs/models/evaluationrunrunscorev2.md new file mode 100644 index 000000000..d4afeaf98 --- /dev/null +++ b/docs/models/evaluationrunrunscorev2.md @@ -0,0 +1,19 @@ +# EvaluationRunRunScoreV2 + +A run evaluator's score: a per-record score plus its metrics. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *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 | +| `deleted_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `value` | *Nullable[Any]* | :heavy_check_mark: | N/A | +| `rationale` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_check_mark: | N/A | +| `status` | *str* | :heavy_check_mark: | N/A | +| `error` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `metrics` | List[[models.ScoreMetric](../models/scoremetric.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/evaluationrunv2response.md b/docs/models/evaluationrunv2response.md index a51f02f18..e2231a76a 100644 --- a/docs/models/evaluationrunv2response.md +++ b/docs/models/evaluationrunv2response.md @@ -28,5 +28,5 @@ | `statistics` | Dict[str, [models.EvaluatorStatistics](../models/evaluatorstatistics.md)] | :heavy_minus_sign: | N/A | | `goal_results` | Dict[str, [models.GoalResult](../models/goalresult.md)] | :heavy_minus_sign: | N/A | | `passed` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | -| `run_scores` | Dict[str, [models.EvaluationRunScoreV2](../models/evaluationrunscorev2.md)] | :heavy_minus_sign: | N/A | +| `run_scores` | Dict[str, [models.EvaluationRunRunScoreV2](../models/evaluationrunrunscorev2.md)] | :heavy_minus_sign: | N/A | | `optimization` | [OptionalNullable[models.RunOptimizationRef]](../models/runoptimizationref.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/evaluationrunv2withrefsresponse.md b/docs/models/evaluationrunv2withrefsresponse.md index a9965ed7e..45af9f92c 100644 --- a/docs/models/evaluationrunv2withrefsresponse.md +++ b/docs/models/evaluationrunv2withrefsresponse.md @@ -28,7 +28,7 @@ | `statistics` | Dict[str, [models.EvaluatorStatistics](../models/evaluatorstatistics.md)] | :heavy_minus_sign: | N/A | | `goal_results` | Dict[str, [models.GoalResult](../models/goalresult.md)] | :heavy_minus_sign: | N/A | | `passed` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | -| `run_scores` | Dict[str, [models.EvaluationRunScoreV2](../models/evaluationrunscorev2.md)] | :heavy_minus_sign: | N/A | +| `run_scores` | Dict[str, [models.EvaluationRunRunScoreV2](../models/evaluationrunrunscorev2.md)] | :heavy_minus_sign: | N/A | | `optimization` | [OptionalNullable[models.RunOptimizationRef]](../models/runoptimizationref.md) | :heavy_minus_sign: | N/A | | `evaluation` | [OptionalNullable[models.RunEvaluationSummary]](../models/runevaluationsummary.md) | :heavy_minus_sign: | N/A | | `project` | [OptionalNullable[models.RunProjectSummary]](../models/runprojectsummary.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/evaluatorv2.md b/docs/models/evaluatorv2.md index 1dd74b7e9..31b55bc66 100644 --- a/docs/models/evaluatorv2.md +++ b/docs/models/evaluatorv2.md @@ -19,4 +19,7 @@ | `weight` | *Optional[float]* | :heavy_minus_sign: | N/A | | `direction` | [OptionalNullable[models.EvaluatorV2Direction]](../models/evaluatorv2direction.md) | :heavy_minus_sign: | N/A | | `min_value` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | -| `max_value` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `max_value` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `display` | List[[models.DisplaySpec](../models/displayspec.md)] | :heavy_minus_sign: | N/A | +| `goals` | List[[models.GoalSpec](../models/goalspec.md)] | :heavy_minus_sign: | N/A | +| `metric_directions` | List[[models.MetricDirectionSpec](../models/metricdirectionspec.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getdeploymentsummariesresponse.md b/docs/models/getdeploymentsummariesresponse.md deleted file mode 100644 index feb01415c..000000000 --- a/docs/models/getdeploymentsummariesresponse.md +++ /dev/null @@ -1,8 +0,0 @@ -# GetDeploymentSummariesResponse - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `deployments` | List[[models.GetDeploymentSummariesResponseDeployment](../models/getdeploymentsummariesresponsedeployment.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getdeploymentsummariesresponsedeployment.md b/docs/models/getdeploymentsummariesresponsedeployment.md deleted file mode 100644 index 88d215e4e..000000000 --- a/docs/models/getdeploymentsummariesresponsedeployment.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetDeploymentSummariesResponseDeployment - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | -| `name` | *str* | :heavy_check_mark: | N/A | -| `creator_id` | *str* | :heavy_check_mark: | N/A | -| `document_count` | *int* | :heavy_check_mark: | N/A | -| `status` | [models.GetDeploymentSummariesResponseDeploymentStatus](../models/getdeploymentsummariesresponsedeploymentstatus.md) | :heavy_check_mark: | N/A | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `deployment` | [models.GetDeploymentSummariesResponseDeploymentDeployment](../models/getdeploymentsummariesresponsedeploymentdeployment.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getdeploymentsummariesresponsedeploymentdeployment.md b/docs/models/getdeploymentsummariesresponsedeploymentdeployment.md deleted file mode 100644 index 1c0bdce14..000000000 --- a/docs/models/getdeploymentsummariesresponsedeploymentdeployment.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetDeploymentSummariesResponseDeploymentDeployment - - -## Supported Types - -### `models.GetDeploymentSummariesResponseVespaDeployment` - -```python -value: models.GetDeploymentSummariesResponseVespaDeployment = /* values here */ -``` - diff --git a/docs/models/getdeploymentsummariesresponsedeploymentstatus.md b/docs/models/getdeploymentsummariesresponsedeploymentstatus.md deleted file mode 100644 index cd13b75ac..000000000 --- a/docs/models/getdeploymentsummariesresponsedeploymentstatus.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetDeploymentSummariesResponseDeploymentStatus - -## Example Usage - -```python -from mistralai.client.models import GetDeploymentSummariesResponseDeploymentStatus - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: GetDeploymentSummariesResponseDeploymentStatus = "online" -``` - - -## Values - -This is an open enum. Unrecognized values will not fail type checks. - -- `"online"` -- `"offline"` diff --git a/docs/models/getdeploymentsummariesresponsevespadeployment.md b/docs/models/getdeploymentsummariesresponsevespadeployment.md deleted file mode 100644 index afa1fdc07..000000000 --- a/docs/models/getdeploymentsummariesresponsevespadeployment.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetDeploymentSummariesResponseVespaDeployment - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `type` | *Literal["vespa"]* | :heavy_check_mark: | N/A | -| `indexes` | List[[models.GetDeploymentSummariesResponseVespaIndex](../models/getdeploymentsummariesresponsevespaindex.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getdeploymentsummariesresponsevespaindex.md b/docs/models/getdeploymentsummariesresponsevespaindex.md deleted file mode 100644 index cd6f7e832..000000000 --- a/docs/models/getdeploymentsummariesresponsevespaindex.md +++ /dev/null @@ -1,10 +0,0 @@ -# GetDeploymentSummariesResponseVespaIndex - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *str* | :heavy_check_mark: | N/A | -| `name` | *str* | :heavy_check_mark: | N/A | -| `document_count` | *Nullable[int]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/goalresult.md b/docs/models/goalresult.md index cb507c3a1..0698ed4e5 100644 --- a/docs/models/goalresult.md +++ b/docs/models/goalresult.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `passed` | *Nullable[bool]* | :heavy_check_mark: | N/A | -| `results` | List[[models.GoalResultItem](../models/goalresultitem.md)] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `passed` | *Nullable[bool]* | :heavy_check_mark: | N/A | +| `results` | List[[models.GoalResultItem](../models/goalresultitem.md)] | :heavy_check_mark: | N/A | +| `missing` | List[[models.MissingGoalItem](../models/missinggoalitem.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/importdatasetfromplaygroundrequest.md b/docs/models/importdatasetfromplaygroundrequest.md deleted file mode 100644 index 72a586bc6..000000000 --- a/docs/models/importdatasetfromplaygroundrequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# ImportDatasetFromPlaygroundRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `conversation_ids` | List[*str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/ingestionpipelinetargetindexref.md b/docs/models/ingestionpipelinetargetindexref.md deleted file mode 100644 index e6fcfe30d..000000000 --- a/docs/models/ingestionpipelinetargetindexref.md +++ /dev/null @@ -1,9 +0,0 @@ -# IngestionPipelineTargetIndexRef - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | -| `type` | *Optional[Literal["vespa"]]* | :heavy_minus_sign: | N/A | -| `name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/metricdirectionspec.md b/docs/models/metricdirectionspec.md new file mode 100644 index 000000000..a7be4f4a0 --- /dev/null +++ b/docs/models/metricdirectionspec.md @@ -0,0 +1,11 @@ +# MetricDirectionSpec + +Which way a run evaluator metric improves. The main value's direction stays the evaluator's ``direction``. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `metric` | *str* | :heavy_check_mark: | N/A | +| `direction` | [models.MetricDirectionSpecDirection](../models/metricdirectionspecdirection.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/metricdirectionspecdirection.md b/docs/models/metricdirectionspecdirection.md new file mode 100644 index 000000000..3f905e5ca --- /dev/null +++ b/docs/models/metricdirectionspecdirection.md @@ -0,0 +1,18 @@ +# MetricDirectionSpecDirection + +## Example Usage + +```python +from mistralai.client.models import MetricDirectionSpecDirection + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: MetricDirectionSpecDirection = "maximize" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"maximize"` +- `"minimize"` diff --git a/docs/models/metricsdata.md b/docs/models/metricsdata.md deleted file mode 100644 index ab3b0389e..000000000 --- a/docs/models/metricsdata.md +++ /dev/null @@ -1,17 +0,0 @@ -# MetricsData - - -## Supported Types - -### `models.UpdateMetricsRequestDeploymentMetricsOnline` - -```python -value: models.UpdateMetricsRequestDeploymentMetricsOnline = /* values here */ -``` - -### `models.UpdateMetricsRequestDeploymentMetricsOffline` - -```python -value: models.UpdateMetricsRequestDeploymentMetricsOffline = /* values here */ -``` - diff --git a/docs/models/missinggoalitem.md b/docs/models/missinggoalitem.md new file mode 100644 index 000000000..2752eb457 --- /dev/null +++ b/docs/models/missinggoalitem.md @@ -0,0 +1,17 @@ +# MissingGoalItem + +A run evaluator goal on a metric the scorer did not return: it fails, with no number to show. + +Kept out of ``results`` so ``GoalResultItem.actual`` stays a number for clients that require one. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `metric` | *str* | :heavy_check_mark: | N/A | +| `operator` | *str* | :heavy_check_mark: | N/A | +| `target` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `target_min` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `target_max` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `message` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/moderationrequest.md b/docs/models/moderationrequest.md new file mode 100644 index 000000000..a9742011d --- /dev/null +++ b/docs/models/moderationrequest.md @@ -0,0 +1,11 @@ +# ModerationRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `model` | *str* | :heavy_check_mark: | ID of the model to use. | mistral-moderation-latest | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | +| `queries` | Dict[str, *str*] | :heavy_minus_sign: | Named moderation queries to evaluate. | | +| `inputs` | [models.ModerationRequestInputs](../models/moderationrequestinputs.md) | :heavy_check_mark: | Text to moderate. | | \ No newline at end of file diff --git a/docs/models/moderationrequestinputs.md b/docs/models/moderationrequestinputs.md new file mode 100644 index 000000000..8e4707c9a --- /dev/null +++ b/docs/models/moderationrequestinputs.md @@ -0,0 +1,19 @@ +# ModerationRequestInputs + +Text to moderate. + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + diff --git a/docs/models/oauth2authorizationcodeauthmethod.md b/docs/models/oauth2authorizationcodeauthmethod.md index 898b8472b..4e000f118 100644 --- a/docs/models/oauth2authorizationcodeauthmethod.md +++ b/docs/models/oauth2authorizationcodeauthmethod.md @@ -3,10 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `method_type` | *Optional[Literal["oauth2"]]* | :heavy_minus_sign: | N/A | -| `headers` | List[[models.ConnectorAuthenticationHeader](../models/connectorauthenticationheader.md)] | :heavy_minus_sign: | Optional headers sent with requests for this auth method. | -| `grant_type` | *Literal["authorization_code"]* | :heavy_check_mark: | N/A | -| `auth_data` | [models.AuthData](../models/authdata.md) | :heavy_check_mark: | N/A | -| `oauth2_server_metadata` | [OptionalNullable[models.ExtendedOAuthServerMetadata]](../models/extendedoauthservermetadata.md) | :heavy_minus_sign: | OAuth2 authorization server metadata (endpoints, scopes_supported, ...). | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `method_type` | *Optional[Literal["oauth2"]]* | :heavy_minus_sign: | N/A | +| `headers` | List[[models.ConnectorAuthenticationHeader](../models/connectorauthenticationheader.md)] | :heavy_minus_sign: | Optional headers sent with requests for this auth method. | +| `grant_type` | *Literal["authorization_code"]* | :heavy_check_mark: | N/A | +| `auth_data` | [models.AuthData](../models/authdata.md) | :heavy_check_mark: | N/A | +| `oauth2_server_metadata` | [OptionalNullable[models.ExtendedOAuthServerMetadata]](../models/extendedoauthservermetadata.md) | :heavy_minus_sign: | OAuth2 authorization server metadata (endpoints, scopes_supported, ...). | +| `token_endpoint_auth_method` | [OptionalNullable[models.TokenEndpointAuthMethod]](../models/tokenendpointauthmethod.md) | :heavy_minus_sign: | How the client secret is sent to the token endpoint: in the request body (client_secret_post) or in an HTTP Basic header (client_secret_basic). Defaults to client_secret_post. | \ No newline at end of file diff --git a/docs/models/observabilityerrorcode.md b/docs/models/observabilityerrorcode.md index d626e8bd7..270ef71e2 100644 --- a/docs/models/observabilityerrorcode.md +++ b/docs/models/observabilityerrorcode.md @@ -39,6 +39,7 @@ This is an open enum. Unrecognized values will not fail type checks. - `"DATASET_NOT_FOUND"` - `"DATASET_TASK_NOT_FOUND"` - `"DATASET_RECORD_NOT_FOUND"` +- `"DATASET_RECORD_ID_CONFLICT"` - `"DATASET_RECORD_FORMAT_ERROR"` - `"AGENT_NOT_FOUND"` - `"AGENT_MISTRAL_API_ERROR"` @@ -69,3 +70,4 @@ This is an open enum. Unrecognized values will not fail type checks. - `"TRACES_FILTER_QUERY_PARSE_ERROR"` - `"TRACE_NOT_FOUND"` - `"SPAN_NOT_FOUND"` +- `"OCSF_NOT_ENABLED"` diff --git a/docs/models/updatemetricsrequestindexmetrics.md b/docs/models/prompttokensdetails.md similarity index 54% rename from docs/models/updatemetricsrequestindexmetrics.md rename to docs/models/prompttokensdetails.md index 6d97c8ef9..2421ce710 100644 --- a/docs/models/updatemetricsrequestindexmetrics.md +++ b/docs/models/prompttokensdetails.md @@ -1,9 +1,11 @@ -# UpdateMetricsRequestIndexMetrics +# PromptTokensDetails + +Token usage details for the prompt. ## Fields | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *str* | :heavy_check_mark: | N/A | -| `document_count` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file +| `cached_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `audio_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/realtimespeechsession.md b/docs/models/realtimespeechsession.md index 256b2bfdd..138f899ea 100644 --- a/docs/models/realtimespeechsession.md +++ b/docs/models/realtimespeechsession.md @@ -11,4 +11,5 @@ | `is_ref_audio` | *bool* | :heavy_check_mark: | N/A | | `streaming_mode` | [models.RealtimeSpeechStreamingMode](../models/realtimespeechstreamingmode.md) | :heavy_check_mark: | N/A | | `response_format` | [models.SpeechOutputFormat](../models/speechoutputformat.md) | :heavy_check_mark: | N/A | -| `expressiveness` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file +| `expressiveness` | *float* | :heavy_check_mark: | N/A | +| `phoneme_hints` | Dict[str, List[[models.IPAPhoneme](../models/ipaphoneme.md)]] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/realtimespeechsessionupdatepayload.md b/docs/models/realtimespeechsessionupdatepayload.md index b93168085..237871dab 100644 --- a/docs/models/realtimespeechsessionupdatepayload.md +++ b/docs/models/realtimespeechsessionupdatepayload.md @@ -3,10 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| `voice` | *OptionalNullable[str]* | :heavy_minus_sign: | Preset voice identifier. Mutually exclusive with ref_audio and voice_profile. | -| `ref_audio` | *OptionalNullable[str]* | :heavy_minus_sign: | Base64-encoded reference audio. Mutually exclusive with voice and voice_profile. | -| `streaming_mode` | [OptionalNullable[models.RealtimeSpeechStreamingMode]](../models/realtimespeechstreamingmode.md) | :heavy_minus_sign: | responsive (default): short chunks, for conversational turns. long_form: chunks grow as the text goes on, for smoother delivery of long texts. | -| `response_format` | [OptionalNullable[models.SpeechOutputFormat]](../models/speechoutputformat.md) | :heavy_minus_sign: | Audio encoding of speech.audio.delta events. pcm is raw 32-bit float little-endian mono. | -| `expressiveness` | *OptionalNullable[float]* | :heavy_minus_sign: | Higher values make the delivery more expressive. Minimum 1.0. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| `voice` | *OptionalNullable[str]* | :heavy_minus_sign: | Preset voice identifier. Mutually exclusive with ref_audio and voice_profile. | +| `ref_audio` | *OptionalNullable[str]* | :heavy_minus_sign: | Base64-encoded reference audio. Mutually exclusive with voice and voice_profile. | +| `streaming_mode` | [OptionalNullable[models.RealtimeSpeechStreamingMode]](../models/realtimespeechstreamingmode.md) | :heavy_minus_sign: | responsive (default): short chunks, for conversational turns. long_form: chunks grow as the text goes on, for smoother delivery of long texts. | +| `response_format` | [OptionalNullable[models.SpeechOutputFormat]](../models/speechoutputformat.md) | :heavy_minus_sign: | Audio encoding of speech.audio.delta events. pcm is raw 32-bit float little-endian mono. | +| `expressiveness` | *OptionalNullable[float]* | :heavy_minus_sign: | Higher values make the delivery more expressive. Minimum 1.0. | +| `phoneme_hints` | Dict[str, List[[models.IPAPhoneme](../models/ipaphoneme.md)]] | :heavy_minus_sign: | Pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones. Replaces the current hints; an empty object clears them. | \ No newline at end of file diff --git a/docs/models/realtimetranscriptionsessionupdatepayload.md b/docs/models/realtimetranscriptionsessionupdatepayload.md index db590af90..6c51eb4f3 100644 --- a/docs/models/realtimetranscriptionsessionupdatepayload.md +++ b/docs/models/realtimetranscriptionsessionupdatepayload.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `audio_format` | [OptionalNullable[models.AudioFormat]](../models/audioformat.md) | :heavy_minus_sign: | Set before sending audio. Audio format updates are rejected after audio starts. | -| `target_streaming_delay_ms` | *OptionalNullable[int]* | :heavy_minus_sign: | Set before sending audio. Streaming delay updates are rejected after audio starts. | -| `diarize` | *OptionalNullable[bool]* | :heavy_minus_sign: | Inline speaker tagging. Set before audio starts. | -| `context_bias` | List[*str*] | :heavy_minus_sign: | Anticipated phrases or terms to bias transcription towards. Set before audio starts. | -| `language` | *OptionalNullable[str]* | :heavy_minus_sign: | ISO-639-1 code of the input audio language. Set before audio starts. | -| `speaker_references` | Dict[str, *str*] | :heavy_minus_sign: | Reference audio for known speakers, keyed by speaker name. Predicted speakers are matched against these references. Requires diarize. Set before sending audio. | -| `turn_detection` | [OptionalNullable[models.TurnDetectionConfig]](../models/turndetectionconfig.md) | :heavy_minus_sign: | Emit turn.start, turn.eager_end, turn.resume and turn.end events derived from the model's semantic voice activity detection. Set before sending audio. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `audio_format` | [OptionalNullable[models.AudioFormat]](../models/audioformat.md) | :heavy_minus_sign: | Set before sending audio. Audio format updates are rejected after audio starts. | +| `target_streaming_delay_ms` | *OptionalNullable[int]* | :heavy_minus_sign: | Set before sending audio. Streaming delay updates are rejected after audio starts. | +| `diarize` | *OptionalNullable[bool]* | :heavy_minus_sign: | Inline speaker tagging. Set before audio starts. | +| `context_bias` | List[*str*] | :heavy_minus_sign: | Anticipated phrases or terms to bias transcription towards. Replaces the current list. Can be updated after audio starts: takes effect after the next input_audio.flush, or from the next utterance if no audio was sent since the last flush. | +| `language` | *OptionalNullable[str]* | :heavy_minus_sign: | ISO-639-1 code of the input audio language. Set before audio starts. | +| `speaker_references` | Dict[str, *str*] | :heavy_minus_sign: | Reference audio for known speakers, keyed by speaker name. Predicted speakers are matched against these references. Requires diarize. Set before sending audio. | +| `turn_detection` | [OptionalNullable[models.TurnDetectionConfig]](../models/turndetectionconfig.md) | :heavy_minus_sign: | Emit turn.start, turn.eager_end, turn.resume and turn.end events derived from the model's semantic voice activity detection. Set before sending audio. | \ No newline at end of file diff --git a/docs/models/registerdeploymentrequestdeployment.md b/docs/models/registerdeploymentrequestdeployment.md deleted file mode 100644 index d034935dd..000000000 --- a/docs/models/registerdeploymentrequestdeployment.md +++ /dev/null @@ -1,10 +0,0 @@ -# RegisterDeploymentRequestDeployment - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `status` | [Optional[models.RegisterDeploymentRequestDeploymentStatus]](../models/registerdeploymentrequestdeploymentstatus.md) | :heavy_minus_sign: | N/A | -| `deployment` | [models.RegisterDeploymentRequestDeploymentDeployment](../models/registerdeploymentrequestdeploymentdeployment.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/registerdeploymentrequestdeploymentdeployment.md b/docs/models/registerdeploymentrequestdeploymentdeployment.md deleted file mode 100644 index 43e02ccca..000000000 --- a/docs/models/registerdeploymentrequestdeploymentdeployment.md +++ /dev/null @@ -1,11 +0,0 @@ -# RegisterDeploymentRequestDeploymentDeployment - - -## Supported Types - -### `models.RegisterDeploymentRequestVespaDeployment` - -```python -value: models.RegisterDeploymentRequestVespaDeployment = /* values here */ -``` - diff --git a/docs/models/registerdeploymentrequestdeploymentstatus.md b/docs/models/registerdeploymentrequestdeploymentstatus.md deleted file mode 100644 index 699406eb9..000000000 --- a/docs/models/registerdeploymentrequestdeploymentstatus.md +++ /dev/null @@ -1,14 +0,0 @@ -# RegisterDeploymentRequestDeploymentStatus - -## Example Usage - -```python -from mistralai.client.models import RegisterDeploymentRequestDeploymentStatus -value: RegisterDeploymentRequestDeploymentStatus = "online" -``` - - -## Values - -- `"online"` -- `"offline"` diff --git a/docs/models/registerdeploymentrequestvespadeployment.md b/docs/models/registerdeploymentrequestvespadeployment.md deleted file mode 100644 index 034ab90fa..000000000 --- a/docs/models/registerdeploymentrequestvespadeployment.md +++ /dev/null @@ -1,11 +0,0 @@ -# RegisterDeploymentRequestVespaDeployment - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `type` | *Literal["vespa"]* | :heavy_check_mark: | N/A | -| `vespa_version` | *str* | :heavy_check_mark: | N/A | -| `indexes` | List[[models.RegisterDeploymentRequestVespaIndex](../models/registerdeploymentrequestvespaindex.md)] | :heavy_check_mark: | N/A | -| `query_url` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/registerdeploymentrequestvespafield.md b/docs/models/registerdeploymentrequestvespafield.md deleted file mode 100644 index 016f77ca1..000000000 --- a/docs/models/registerdeploymentrequestvespafield.md +++ /dev/null @@ -1,13 +0,0 @@ -# RegisterDeploymentRequestVespaField - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `type` | [models.SchemaFieldDataType](../models/schemafielddatatype.md) | :heavy_check_mark: | N/A | -| `storage` | [models.SchemaFieldStorage](../models/schemafieldstorage.md) | :heavy_check_mark: | N/A | -| `ranking` | [models.SchemaFieldRankingType](../models/schemafieldrankingtype.md) | :heavy_check_mark: | N/A | -| `index_type` | [Nullable[models.SchemaFieldIndex]](../models/schemafieldindex.md) | :heavy_check_mark: | N/A | -| `multidimensional` | *bool* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/registerdeploymentrequestvespaindex.md b/docs/models/registerdeploymentrequestvespaindex.md deleted file mode 100644 index e10a763af..000000000 --- a/docs/models/registerdeploymentrequestvespaindex.md +++ /dev/null @@ -1,11 +0,0 @@ -# RegisterDeploymentRequestVespaIndex - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `fields` | List[[models.RegisterDeploymentRequestVespaField](../models/registerdeploymentrequestvespafield.md)] | :heavy_check_mark: | N/A | -| `sd` | *str* | :heavy_check_mark: | N/A | -| `embedding_dimensions` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/registersearchindexresponseindex.md b/docs/models/registersearchindexresponseindex.md deleted file mode 100644 index cfdde548c..000000000 --- a/docs/models/registersearchindexresponseindex.md +++ /dev/null @@ -1,8 +0,0 @@ -# RegisterSearchIndexResponseIndex - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/responseformat.md b/docs/models/responseformat.md index 5cab22f2b..63dac12d6 100644 --- a/docs/models/responseformat.md +++ b/docs/models/responseformat.md @@ -1,6 +1,6 @@ # ResponseFormat -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. +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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt. ## Fields diff --git a/docs/models/scalarstatisticvalue.md b/docs/models/scalarstatisticvalue.md index 95e9f8d1c..f8a521994 100644 --- a/docs/models/scalarstatisticvalue.md +++ b/docs/models/scalarstatisticvalue.md @@ -15,4 +15,5 @@ The ``type`` discriminator lets future result shapes (e.g. a categorical ``categ | ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | | `type` | *Optional[Literal["scalar"]]* | :heavy_minus_sign: | N/A | | `id` | *str* | :heavy_check_mark: | N/A | -| `value` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `value` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `sample_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/schemafielddatatype.md b/docs/models/schemafielddatatype.md deleted file mode 100644 index de3219229..000000000 --- a/docs/models/schemafielddatatype.md +++ /dev/null @@ -1,18 +0,0 @@ -# SchemaFieldDataType - -## Example Usage - -```python -from mistralai.client.models import SchemaFieldDataType -value: SchemaFieldDataType = "int" -``` - - -## Values - -- `"int"` -- `"bool"` -- `"string"` -- `"embedding"` -- `"long"` -- `"float"` diff --git a/docs/models/schemafieldindex.md b/docs/models/schemafieldindex.md deleted file mode 100644 index a30cc0c7a..000000000 --- a/docs/models/schemafieldindex.md +++ /dev/null @@ -1,15 +0,0 @@ -# SchemaFieldIndex - -## Example Usage - -```python -from mistralai.client.models import SchemaFieldIndex -value: SchemaFieldIndex = "ann" -``` - - -## Values - -- `"ann"` -- `"bm25"` -- `"attribute"` diff --git a/docs/models/schemafieldrankingtype.md b/docs/models/schemafieldrankingtype.md deleted file mode 100644 index 6236c7f4b..000000000 --- a/docs/models/schemafieldrankingtype.md +++ /dev/null @@ -1,20 +0,0 @@ -# SchemaFieldRankingType - -## Example Usage - -```python -from mistralai.client.models import SchemaFieldRankingType -value: SchemaFieldRankingType = "count" -``` - - -## Values - -- `"count"` -- `"embedding"` -- `"timestamp"` -- `"text"` -- `"string"` -- `"bool"` -- `"int"` -- `"language"` diff --git a/docs/models/schemafieldstorage.md b/docs/models/schemafieldstorage.md deleted file mode 100644 index f0bd62641..000000000 --- a/docs/models/schemafieldstorage.md +++ /dev/null @@ -1,14 +0,0 @@ -# SchemaFieldStorage - -## Example Usage - -```python -from mistralai.client.models import SchemaFieldStorage -value: SchemaFieldStorage = "in_memory" -``` - - -## Values - -- `"in_memory"` -- `"on_disk"` diff --git a/docs/models/scoremetric.md b/docs/models/scoremetric.md new file mode 100644 index 000000000..bbbb0abf1 --- /dev/null +++ b/docs/models/scoremetric.md @@ -0,0 +1,11 @@ +# ScoreMetric + +One named number of a run evaluator score. Stored and sent as an ordered list (JSONB keeps no key order). + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `value` | [models.ScoreMetricValue](../models/scoremetricvalue.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/scoremetricvalue.md b/docs/models/scoremetricvalue.md new file mode 100644 index 000000000..da4abec57 --- /dev/null +++ b/docs/models/scoremetricvalue.md @@ -0,0 +1,17 @@ +# ScoreMetricValue + + +## Supported Types + +### `int` + +```python +value: int = /* values here */ +``` + +### `float` + +```python +value: float = /* values here */ +``` + diff --git a/docs/models/signalinvocationbody.md b/docs/models/signalinvocationbody.md index 14dc23e0e..b35cf6af7 100644 --- a/docs/models/signalinvocationbody.md +++ b/docs/models/signalinvocationbody.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | The name of the signal to send | -| `input` | [OptionalNullable[models.SignalInvocationBodyInput]](../models/signalinvocationbodyinput.md) | :heavy_minus_sign: | Input data for the signal, matching its schema | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | The name of the signal to send | +| `input` | [OptionalNullable[models.SignalInvocationBodyInput]](../models/signalinvocationbodyinput.md) | :heavy_minus_sign: | Input data for the signal, matching its schema | +| `call_context` | Dict[str, [models.SignalInvocationBodyCallContext](../models/signalinvocationbodycallcontext.md)] | :heavy_minus_sign: | Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here. | \ No newline at end of file diff --git a/docs/models/signalinvocationbodycallcontext.md b/docs/models/signalinvocationbodycallcontext.md new file mode 100644 index 000000000..5488aa41b --- /dev/null +++ b/docs/models/signalinvocationbodycallcontext.md @@ -0,0 +1,23 @@ +# SignalInvocationBodyCallContext + + +## Supported Types + +### `bool` + +```python +value: bool = /* values here */ +``` + +### `int` + +```python +value: int = /* values here */ +``` + +### `str` + +```python +value: str = /* values here */ +``` + diff --git a/docs/models/simplenumericstatisticspec.md b/docs/models/simplenumericstatisticspec.md index 9c8327137..e8199baa2 100644 --- a/docs/models/simplenumericstatisticspec.md +++ b/docs/models/simplenumericstatisticspec.md @@ -1,6 +1,10 @@ # SimpleNumericStatisticSpec -A scalar numeric reduction with no parameters (``avg``/``sum``/``min``/``max``/``std``/``count``). +A scalar numeric reduction (``avg``/``sum``/``min``/``max``/``std``/``count``). + +``weight_key`` (``avg`` only) turns the mean into a weighted mean, ``sum(w * x) / sum(w)``, where +each score's weight ``w`` is read from its ``metadata`` under that key. Scores whose weight is +missing, non-numeric or negative are left out of that statistic. ## Fields @@ -8,4 +12,5 @@ A scalar numeric reduction with no parameters (``avg``/``sum``/``min``/``max``/` | Field | Type | Required | Description | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | | `kind` | [models.SimpleNumericStatisticSpecKind](../models/simplenumericstatisticspeckind.md) | :heavy_check_mark: | N/A | +| `weight_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `goal` | [OptionalNullable[models.GoalSpec]](../models/goalspec.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/tokenendpointauthmethod.md b/docs/models/tokenendpointauthmethod.md new file mode 100644 index 000000000..ae3247a7f --- /dev/null +++ b/docs/models/tokenendpointauthmethod.md @@ -0,0 +1,14 @@ +# TokenEndpointAuthMethod + +## Example Usage + +```python +from mistralai.client.models import TokenEndpointAuthMethod +value: TokenEndpointAuthMethod = "client_secret_post" +``` + + +## Values + +- `"client_secret_post"` +- `"client_secret_basic"` diff --git a/docs/models/toolcall.md b/docs/models/toolcall.md index 9d236e8b2..4211918be 100644 --- a/docs/models/toolcall.md +++ b/docs/models/toolcall.md @@ -5,7 +5,7 @@ | 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 +| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/toolchoice.md b/docs/models/toolchoice.md index a457f96f6..9e178a001 100644 --- a/docs/models/toolchoice.md +++ b/docs/models/toolchoice.md @@ -1,7 +1,5 @@ # ToolChoice -ToolChoice is either a ToolChoiceEnum or a ToolChoice - ## Fields diff --git a/docs/models/transcriptionstreameventsdata.md b/docs/models/transcriptionstreameventsdata.md index eea8e9281..05cd0b664 100644 --- a/docs/models/transcriptionstreameventsdata.md +++ b/docs/models/transcriptionstreameventsdata.md @@ -27,3 +27,27 @@ value: models.TranscriptionStreamSegmentDelta = /* values here */ value: models.TranscriptionStreamTextDelta = /* values here */ ``` +### `models.TurnDetectionEagerEndEvent` + +```python +value: models.TurnDetectionEagerEndEvent = /* values here */ +``` + +### `models.TurnDetectionEndEvent` + +```python +value: models.TurnDetectionEndEvent = /* values here */ +``` + +### `models.TurnDetectionResumeEvent` + +```python +value: models.TurnDetectionResumeEvent = /* values here */ +``` + +### `models.TurnDetectionStartEvent` + +```python +value: models.TurnDetectionStartEvent = /* values here */ +``` + diff --git a/docs/models/transcriptionstreameventtypes.md b/docs/models/transcriptionstreameventtypes.md index 9e49384e3..6febb73ba 100644 --- a/docs/models/transcriptionstreameventtypes.md +++ b/docs/models/transcriptionstreameventtypes.md @@ -18,3 +18,7 @@ This is an open enum. Unrecognized values will not fail type checks. - `"transcription.segment"` - `"transcription.text.delta"` - `"transcription.done"` +- `"turn.start"` +- `"turn.eager_end"` +- `"turn.resume"` +- `"turn.end"` diff --git a/docs/models/turndetectioneagerendevent.md b/docs/models/turndetectioneagerendevent.md index 9739161d2..4d4129445 100644 --- a/docs/models/turndetectioneagerendevent.md +++ b/docs/models/turndetectioneagerendevent.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| `time_s` | *float* | :heavy_check_mark: | N/A | -| `type` | *Optional[Literal["turn.eager_end"]]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------- | --------------------------- | --------------------------- | --------------------------- | +| `time_s` | *float* | :heavy_check_mark: | N/A | +| `type` | *Literal["turn.eager_end"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/turndetectionendevent.md b/docs/models/turndetectionendevent.md index 76c9fc708..1ff18ac65 100644 --- a/docs/models/turndetectionendevent.md +++ b/docs/models/turndetectionendevent.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | | `time_s` | *float* | :heavy_check_mark: | N/A | -| `type` | *Optional[Literal["turn.end"]]* | :heavy_minus_sign: | N/A | +| `type` | *Literal["turn.end"]* | :heavy_check_mark: | N/A | | `end_reason` | [models.TurnDetectionEndReason](../models/turndetectionendreason.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/turndetectionendreason.md b/docs/models/turndetectionendreason.md index 59533839e..a21d12b90 100644 --- a/docs/models/turndetectionendreason.md +++ b/docs/models/turndetectionendreason.md @@ -4,11 +4,15 @@ ```python from mistralai.client.models import TurnDetectionEndReason + +# Open enum: unrecognized values are captured as UnrecognizedStr value: TurnDetectionEndReason = "threshold" ``` ## Values +This is an open enum. Unrecognized values will not fail type checks. + - `"threshold"` - `"timeout"` diff --git a/docs/models/turndetectionresumeevent.md b/docs/models/turndetectionresumeevent.md index 01b8a9998..c751c1926 100644 --- a/docs/models/turndetectionresumeevent.md +++ b/docs/models/turndetectionresumeevent.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `time_s` | *float* | :heavy_check_mark: | N/A | -| `type` | *Optional[Literal["turn.resume"]]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `time_s` | *float* | :heavy_check_mark: | N/A | +| `type` | *Literal["turn.resume"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/turndetectionstartevent.md b/docs/models/turndetectionstartevent.md index 54986b294..82836c124 100644 --- a/docs/models/turndetectionstartevent.md +++ b/docs/models/turndetectionstartevent.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `time_s` | *float* | :heavy_check_mark: | N/A | -| `type` | *Optional[Literal["turn.start"]]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `time_s` | *float* | :heavy_check_mark: | N/A | +| `type` | *Literal["turn.start"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/unregisterdeploymentv1ragdeploymentsdeploymentiddeleterequest.md b/docs/models/unregisterdeploymentv1ragdeploymentsdeploymentiddeleterequest.md deleted file mode 100644 index ff254bc83..000000000 --- a/docs/models/unregisterdeploymentv1ragdeploymentsdeploymentiddeleterequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# UnregisterDeploymentV1RagDeploymentsDeploymentIDDeleteRequest - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `deployment_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updatedatasetrequest.md b/docs/models/updatedatasetrequest.md index 2a5194e49..b23f18f0b 100644 --- a/docs/models/updatedatasetrequest.md +++ b/docs/models/updatedatasetrequest.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ----------------------- | ----------------------- | ----------------------- | ----------------------- | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/updateindexmetricsv1ragdeploymentsdeploymentidmetricsputrequest.md b/docs/models/updateindexmetricsv1ragdeploymentsdeploymentidmetricsputrequest.md deleted file mode 100644 index 678b0ddd0..000000000 --- a/docs/models/updateindexmetricsv1ragdeploymentsdeploymentidmetricsputrequest.md +++ /dev/null @@ -1,9 +0,0 @@ -# UpdateIndexMetricsV1RagDeploymentsDeploymentIDMetricsPutRequest - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `deployment_id` | *str* | :heavy_check_mark: | N/A | -| `request_body` | [models.MetricsData](../models/metricsdata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updateinvocationbody.md b/docs/models/updateinvocationbody.md index e810a041e..b6731e0c5 100644 --- a/docs/models/updateinvocationbody.md +++ b/docs/models/updateinvocationbody.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | The name of the update to request | -| `input` | [OptionalNullable[models.UpdateInvocationBodyInput]](../models/updateinvocationbodyinput.md) | :heavy_minus_sign: | Input data for the update, matching its schema | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | The name of the update to request | +| `input` | [OptionalNullable[models.UpdateInvocationBodyInput]](../models/updateinvocationbodyinput.md) | :heavy_minus_sign: | Input data for the update, matching its schema | +| `call_context` | Dict[str, [models.UpdateInvocationBodyCallContext](../models/updateinvocationbodycallcontext.md)] | :heavy_minus_sign: | Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here. | \ No newline at end of file diff --git a/docs/models/updateinvocationbodycallcontext.md b/docs/models/updateinvocationbodycallcontext.md new file mode 100644 index 000000000..64b36d129 --- /dev/null +++ b/docs/models/updateinvocationbodycallcontext.md @@ -0,0 +1,23 @@ +# UpdateInvocationBodyCallContext + + +## Supported Types + +### `bool` + +```python +value: bool = /* values here */ +``` + +### `int` + +```python +value: int = /* values here */ +``` + +### `str` + +```python +value: str = /* values here */ +``` + diff --git a/docs/models/updatemetricsrequestdeploymentmetricsoffline.md b/docs/models/updatemetricsrequestdeploymentmetricsoffline.md deleted file mode 100644 index 695a683a4..000000000 --- a/docs/models/updatemetricsrequestdeploymentmetricsoffline.md +++ /dev/null @@ -1,9 +0,0 @@ -# UpdateMetricsRequestDeploymentMetricsOffline - - -## Fields - -| Field | Type | Required | Description | -| -------------------- | -------------------- | -------------------- | -------------------- | -| `status` | *Literal["offline"]* | :heavy_check_mark: | N/A | -| `clear_metrics` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/updatemetricsrequestdeploymentmetricsonline.md b/docs/models/updatemetricsrequestdeploymentmetricsonline.md deleted file mode 100644 index ba8ef4dee..000000000 --- a/docs/models/updatemetricsrequestdeploymentmetricsonline.md +++ /dev/null @@ -1,10 +0,0 @@ -# UpdateMetricsRequestDeploymentMetricsOnline - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `status` | *Literal["online"]* | :heavy_check_mark: | N/A | -| `document_count` | *int* | :heavy_check_mark: | N/A | -| `index_metrics` | List[[models.UpdateMetricsRequestIndexMetrics](../models/updatemetricsrequestindexmetrics.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/usageinfo.md b/docs/models/usageinfo.md index fb460774f..9f3d7b1f3 100644 --- a/docs/models/usageinfo.md +++ b/docs/models/usageinfo.md @@ -3,11 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `prompt_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `completion_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `total_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `prompt_audio_seconds` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `service_tier` | *OptionalNullable[str]* | :heavy_minus_sign: | The service tier at which the request was processed: standard or priority. | -| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `prompt_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `completion_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `total_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `prompt_audio_seconds` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `prompt_tokens_details` | [OptionalNullable[models.PromptTokensDetails]](../models/prompttokensdetails.md) | :heavy_minus_sign: | N/A | +| `service_tier` | *OptionalNullable[str]* | :heavy_minus_sign: | The service tier at which the request was processed: standard or priority. | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/webhook.md b/docs/models/webhook.md index 8ab8c6bf9..9bb68ef64 100644 --- a/docs/models/webhook.md +++ b/docs/models/webhook.md @@ -12,6 +12,7 @@ | `owner_type` | [models.TriggersOwnerType](../models/triggersownertype.md) | :heavy_check_mark: | N/A | | `provider` | [models.WebhookProvider](../models/webhookprovider.md) | :heavy_check_mark: | N/A | | `name` | *str* | :heavy_check_mark: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `url` | *str* | :heavy_check_mark: | N/A | | `http_method` | *str* | :heavy_check_mark: | N/A | | `url_verified` | *Nullable[bool]* | :heavy_check_mark: | N/A | @@ -27,6 +28,7 @@ | ~~`event_type_path`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. | | `event_type_pattern` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `event_id_pattern` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `timestamp_pattern` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :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 | \ No newline at end of file diff --git a/docs/models/workflowexecutionrequest.md b/docs/models/workflowexecutionrequest.md index c95a696ad..e29c5cb6b 100644 --- a/docs/models/workflowexecutionrequest.md +++ b/docs/models/workflowexecutionrequest.md @@ -3,15 +3,16 @@ ## Fields -| 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` | *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. | -| `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. | -| `custom_tracing_attributes` | Dict[str, *str*] | :heavy_minus_sign: | N/A | -| `force_new_trace` | *Optional[bool]* | :heavy_minus_sign: | If true, ignore the caller's trace context and start a new, independent trace for this execution instead of joining the caller's trace. | -| `traceparent` | *OptionalNullable[str]* | :heavy_minus_sign: | W3C trace context to join this execution to the caller's trace. Ignored when force_new_trace is set. | -| `extensions` | Dict[str, *Any*] | :heavy_minus_sign: | Plugin-specific data to propagate into WorkflowContext.extensions at execution time. | -| ~~`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_name instead. | -| `deployment_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the deployment to route this execution to | \ No newline at end of file +| 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` | *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. | +| `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. | +| `custom_tracing_attributes` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `force_new_trace` | *Optional[bool]* | :heavy_minus_sign: | If true, ignore the caller's trace context and start a new, independent trace for this execution instead of joining the caller's trace. | +| `traceparent` | *OptionalNullable[str]* | :heavy_minus_sign: | W3C trace context to join this execution to the caller's trace. Ignored when force_new_trace is set. | +| `extensions` | Dict[str, *Any*] | :heavy_minus_sign: | Plugin-specific data to propagate into WorkflowContext.extensions at execution time. | +| `call_context` | Dict[str, [models.WorkflowExecutionRequestCallContext](../models/workflowexecutionrequestcallcontext.md)] | :heavy_minus_sign: | Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here. | +| ~~`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_name instead. | +| `deployment_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the deployment to route this execution to | \ No newline at end of file diff --git a/docs/models/workflowexecutionrequestcallcontext.md b/docs/models/workflowexecutionrequestcallcontext.md new file mode 100644 index 000000000..17d021663 --- /dev/null +++ b/docs/models/workflowexecutionrequestcallcontext.md @@ -0,0 +1,23 @@ +# WorkflowExecutionRequestCallContext + + +## Supported Types + +### `bool` + +```python +value: bool = /* values here */ +``` + +### `int` + +```python +value: int = /* values here */ +``` + +### `str` + +```python +value: str = /* values here */ +``` + diff --git a/docs/sdks/agents/README.md b/docs/sdks/agents/README.md index 939fd3ab7..a6ce04b50 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -41,36 +41,36 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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."
}
] | -| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | -| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. | | -| `stop` | [OptionalNullable[models.AgentsCompletionRequestStop]](../../models/agentscompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | -| `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.AgentsCompletionRequestTool](../../models/agentscompletionrequesttool.md)] | :heavy_minus_sign: | N/A | | -| `tool_choice` | [Optional[models.AgentsCompletionRequestToolChoice]](../../models/agentscompletionrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | -| `presence_penalty` | *OptionalNullable[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` | *OptionalNullable[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. | | -| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | -| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | -| `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | -| `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | -| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | -| `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | -| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../../models/requestedservicetier.md) | :heavy_minus_sign: | Determines whether to serve the request using priority or standard capacity. | | -| `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 | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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."
}
] | +| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | +| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. | | +| `stop` | [OptionalNullable[models.AgentsCompletionRequestStop]](../../models/agentscompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt. | **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.AgentsCompletionRequestTool](../../models/agentscompletionrequesttool.md)] | :heavy_minus_sign: | N/A | | +| `tool_choice` | [Optional[models.AgentsCompletionRequestToolChoice]](../../models/agentscompletionrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | +| `presence_penalty` | *OptionalNullable[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` | *OptionalNullable[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. | | +| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | +| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | +| `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | +| `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | +| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../../models/requestedservicetier.md) | :heavy_minus_sign: | Determines whether to serve the request using priority or standard capacity. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -117,36 +117,36 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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."
}
] | -| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | -| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `stop` | [OptionalNullable[models.AgentsCompletionStreamRequestStop]](../../models/agentscompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | -| `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.AgentsCompletionStreamRequestTool](../../models/agentscompletionstreamrequesttool.md)] | :heavy_minus_sign: | N/A | | -| `tool_choice` | [Optional[models.AgentsCompletionStreamRequestToolChoice]](../../models/agentscompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | -| `presence_penalty` | *OptionalNullable[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` | *OptionalNullable[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. | | -| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | -| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | -| `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | -| `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | -| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | -| `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | -| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../../models/requestedservicetier.md) | :heavy_minus_sign: | Determines whether to serve the request using priority or standard capacity. | | -| `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 | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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."
}
] | +| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | +| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `stop` | [OptionalNullable[models.AgentsCompletionStreamRequestStop]](../../models/agentscompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt. | **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.AgentsCompletionStreamRequestTool](../../models/agentscompletionstreamrequesttool.md)] | :heavy_minus_sign: | N/A | | +| `tool_choice` | [Optional[models.AgentsCompletionStreamRequestToolChoice]](../../models/agentscompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | +| `presence_penalty` | *OptionalNullable[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` | *OptionalNullable[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. | | +| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | +| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | +| `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | +| `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | +| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../../models/requestedservicetier.md) | :heavy_minus_sign: | Determines whether to serve the request using priority or standard capacity. | | +| `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/chat/README.md b/docs/sdks/chat/README.md index 3a4fce38b..aca36e50f 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -41,39 +41,39 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions. | mistral-large-latest | -| `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."
}
] | -| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | -| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | -| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. | | -| `stop` | [OptionalNullable[models.ChatCompletionRequestStop]](../../models/chatcompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | -| `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.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` | *OptionalNullable[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` | *OptionalNullable[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. | | -| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | -| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | -| `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | -| `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | -| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | -| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | -| `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | -| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../../models/requestedservicetier.md) | :heavy_minus_sign: | Determines whether to serve the request using priority or standard capacity. | | -| `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | -| `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 | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions. | mistral-large-latest | +| `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."
}
] | +| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | +| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | +| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. | | +| `stop` | [OptionalNullable[models.ChatCompletionRequestStop]](../../models/chatcompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt. | **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.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` | *OptionalNullable[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` | *OptionalNullable[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. | | +| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | +| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | +| `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | +| `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | +| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../../models/requestedservicetier.md) | :heavy_minus_sign: | Determines whether to serve the request using priority or standard capacity. | | +| `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -120,39 +120,39 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions. | mistral-large-latest | -| `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."
}
] | -| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | -| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | -| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `stop` | [OptionalNullable[models.ChatCompletionStreamRequestStop]](../../models/chatcompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | -| `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.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` | *OptionalNullable[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` | *OptionalNullable[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. | | -| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | -| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | -| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | -| `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | -| `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | -| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | -| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | -| `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | -| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../../models/requestedservicetier.md) | :heavy_minus_sign: | Determines whether to serve the request using priority or standard capacity. | | -| `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | -| `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 | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions. | mistral-large-latest | +| `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."
}
] | +| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | +| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | +| `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `stop` | [OptionalNullable[models.ChatCompletionStreamRequestStop]](../../models/chatcompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt. | **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.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` | *OptionalNullable[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` | *OptionalNullable[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. | | +| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `repetition_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | +| `top_k` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `prompt_logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | +| `top_prompt_logprobs` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | +| `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | +| `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | +| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `service_tier` | [OptionalNullable[models.RequestedServiceTier]](../../models/requestedservicetier.md) | :heavy_minus_sign: | Determines whether to serve the request using priority or standard capacity. | | +| `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | +| `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/classifiers/README.md b/docs/sdks/classifiers/README.md index 7792679f1..170b2045a 100644 --- a/docs/sdks/classifiers/README.md +++ b/docs/sdks/classifiers/README.md @@ -36,12 +36,13 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | Example | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `model` | *str* | :heavy_check_mark: | ID of the model to use. | mistral-moderation-latest | -| `inputs` | [models.ClassificationRequestInputs](../../models/classificationrequestinputs.md) | :heavy_check_mark: | Text to classify. | | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | -| `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 | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `model` | *str* | :heavy_check_mark: | ID of the model to use. | mistral-moderation-latest | +| `inputs` | [models.ModerationRequestInputs](../../models/moderationrequestinputs.md) | :heavy_check_mark: | Text to moderate. | | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | +| `queries` | Dict[str, *str*] | :heavy_minus_sign: | Named moderation queries to evaluate. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -86,7 +87,7 @@ with Mistral( | Parameter | Type | Required | Description | | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `inputs` | [models.ChatModerationRequestInputs3](../../models/chatmoderationrequestinputs3.md) | :heavy_check_mark: | Chat to classify | +| `inputs` | [models.ChatModerationRequestInputs3](../../models/chatmoderationrequestinputs3.md) | :heavy_check_mark: | Chat to classify. | | `model` | *str* | :heavy_check_mark: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | diff --git a/docs/sdks/datasets/README.md b/docs/sdks/datasets/README.md index cdfd6e98d..3720e2526 100644 --- a/docs/sdks/datasets/README.md +++ b/docs/sdks/datasets/README.md @@ -11,8 +11,8 @@ * [update](#update) - Patch dataset * [list_records](#list_records) - List existing records in the dataset * [create_record](#create_record) - Add a record to the dataset +* [create_records](#create_records) - Add several records to the dataset * [import_from_file](#import_from_file) - Populate the dataset with records from an uploaded file -* [import_from_playground](#import_from_playground) - Populate the dataset with records from playground conversations * [import_from_spans](#import_from_spans) - Populate the dataset with records mapped from telemetry spans * [import_from_dataset_records](#import_from_dataset_records) - Populate the dataset with records from another dataset * [export_to_jsonl](#export_to_jsonl) - Export to the Files API and retrieve presigned URL to download the resulting JSONL file @@ -48,6 +48,7 @@ with Mistral( | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `name` | *str* | :heavy_check_mark: | N/A | | `description` | *str* | :heavy_check_mark: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -211,6 +212,7 @@ with Mistral( | `dataset_id` | *str* | :heavy_check_mark: | Dataset UUID or workspace-scoped slug. UUID-shaped values are always interpreted as dataset IDs. | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -321,13 +323,13 @@ with Mistral( | errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | -## import_from_file +## create_records -Populate the dataset with records from an uploaded file +Creates 1 to 100 records in one transaction: if one record is invalid, none is created. Records are returned in the request order. ### Example Usage - + ```python from mistralai.client import Mistral import os @@ -337,7 +339,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY"), ) as mistral: - res = mistral.beta.observability.datasets.import_from_file(dataset_id="1c96c925-cc58-4529-863d-9fe66a6f1924", file_id="") + res = mistral.beta.observability.datasets.create_records(dataset_id="", records=[]) # Handle response print(res) @@ -349,12 +351,12 @@ with Mistral( | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | `dataset_id` | *str* | :heavy_check_mark: | Dataset UUID or workspace-scoped slug. UUID-shaped values are always interpreted as dataset IDs. | -| `file_id` | *str* | :heavy_check_mark: | N/A | +| `records` | List[[models.CreateDatasetRecordsItem](../../models/createdatasetrecordsitem.md)] | :heavy_check_mark: | Records to add. They are created together: if one is invalid, none is created. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.DatasetImportTask](../../models/datasetimporttask.md)** +**[models.CreateDatasetRecordsResponse](../../models/createdatasetrecordsresponse.md)** ### Errors @@ -363,13 +365,13 @@ with Mistral( | errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | -## import_from_playground +## import_from_file -Populate the dataset with records from playground conversations +Populate the dataset with records from an uploaded file ### Example Usage - + ```python from mistralai.client import Mistral import os @@ -379,7 +381,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY"), ) as mistral: - res = mistral.beta.observability.datasets.import_from_playground(dataset_id="5cb42584-5fcf-4837-997a-6a67c5e6900d", conversation_ids=[]) + res = mistral.beta.observability.datasets.import_from_file(dataset_id="1c96c925-cc58-4529-863d-9fe66a6f1924", file_id="") # Handle response print(res) @@ -391,7 +393,7 @@ with Mistral( | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | `dataset_id` | *str* | :heavy_check_mark: | Dataset UUID or workspace-scoped slug. UUID-shaped values are always interpreted as dataset IDs. | -| `conversation_ids` | List[*str*] | :heavy_check_mark: | N/A | +| `file_id` | *str* | :heavy_check_mark: | N/A | | `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/deployments/README.md b/docs/sdks/deployments/README.md index 0465753b8..0d54fdf2d 100644 --- a/docs/sdks/deployments/README.md +++ b/docs/sdks/deployments/README.md @@ -15,6 +15,7 @@ * [restart_deployment](#restart_deployment) - Restart Deployment * [list_deployment_workers](#list_deployment_workers) - List Deployment Workers * [get_deployment_archive](#get_deployment_archive) - Get Deployment Archive +* [create_deployment_archive](#create_deployment_archive) - Create Deployment Archive * [get_deployment_logs](#get_deployment_logs) - Get Deployment Logs * [stream_deployment_logs](#stream_deployment_logs) - Stream Deployment Logs @@ -489,6 +490,49 @@ with Mistral( | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | +## create_deployment_archive + +Create an empty archive, with a signed URL to upload the tarball a managed deployment builds from. + +PUT the gzipped tar to `upload_url` with `upload_headers`, then pass `archive_id` in the spec on create or update. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY"), +) as mistral: + + res = mistral.workflows.deployments.create_deployment_archive(size=911758) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `size` | *int* | :heavy_check_mark: | Size of the gzipped tar in bytes, at most 256 MiB. The upload URL accepts exactly this size. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DeploymentArchiveUploadResponse](../../models/deploymentarchiveuploadresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + ## get_deployment_logs Retrieve logs for a deployment (across all of its workers). diff --git a/docs/sdks/executions/README.md b/docs/sdks/executions/README.md index 144e7ca08..0dcf5de1c 100644 --- a/docs/sdks/executions/README.md +++ b/docs/sdks/executions/README.md @@ -131,12 +131,13 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `execution_id` | *str* | :heavy_check_mark: | N/A | -| `name` | *str* | :heavy_check_mark: | The name of the signal to send | -| `input` | [OptionalNullable[models.SignalInvocationBodyInput]](../../models/signalinvocationbodyinput.md) | :heavy_minus_sign: | Input data for the signal, matching its schema | -| `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 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | The name of the signal to send | +| `input` | [OptionalNullable[models.SignalInvocationBodyInput]](../../models/signalinvocationbodyinput.md) | :heavy_minus_sign: | Input data for the signal, matching its schema | +| `call_context` | Dict[str, [models.SignalInvocationBodyCallContext](../../models/signalinvocationbodycallcontext.md)] | :heavy_minus_sign: | Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -414,12 +415,13 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `execution_id` | *str* | :heavy_check_mark: | N/A | -| `name` | *str* | :heavy_check_mark: | The name of the update to request | -| `input` | [OptionalNullable[models.UpdateInvocationBodyInput]](../../models/updateinvocationbodyinput.md) | :heavy_minus_sign: | Input data for the update, matching its schema | -| `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 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | The name of the update to request | +| `input` | [OptionalNullable[models.UpdateInvocationBodyInput]](../../models/updateinvocationbodyinput.md) | :heavy_minus_sign: | Input data for the update, matching its schema | +| `call_context` | Dict[str, [models.UpdateInvocationBodyCallContext](../../models/updateinvocationbodycallcontext.md)] | :heavy_minus_sign: | Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here. | +| `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/files/README.md b/docs/sdks/files/README.md index 447b59e4a..67ccb1342 100644 --- a/docs/sdks/files/README.md +++ b/docs/sdks/files/README.md @@ -36,7 +36,7 @@ with Mistral( res = mistral.files.upload(file={ "file_name": "example.file", "content": open("example.file", "rb"), - }, visibility="workspace") + }, visibility="workspace", purpose="batch") # Handle response print(res) diff --git a/docs/sdks/ingestionpipelineconfigurations/README.md b/docs/sdks/ingestionpipelineconfigurations/README.md index 08ddfa65e..e0ea6fa4d 100644 --- a/docs/sdks/ingestionpipelineconfigurations/README.md +++ b/docs/sdks/ingestionpipelineconfigurations/README.md @@ -72,12 +72,11 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `pipeline_composition` | Dict[str, *str*] | :heavy_minus_sign: | N/A | -| `target_indexes` | List[[models.IngestionPipelineTargetIndexRef](../../models/ingestionpipelinetargetindexref.md)] | :heavy_minus_sign: | N/A | -| `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 | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `pipeline_composition` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `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/ragsearchindexes/README.md b/docs/sdks/ragsearchindexes/README.md deleted file mode 100644 index 3b21df3db..000000000 --- a/docs/sdks/ragsearchindexes/README.md +++ /dev/null @@ -1,182 +0,0 @@ -# Beta.Rag.SearchIndexes - -## Overview - -### Available Operations - -* [get_deployment_summaries](#get_deployment_summaries) - Get Deployment Summaries -* [register_deployment](#register_deployment) - Register (or re-register) a search index -* [unregister_deployment](#unregister_deployment) - Unregister Deployment -* [update_index_metrics](#update_index_metrics) - Update Index Metrics - -## get_deployment_summaries - -Fetch all indexes available to a user - -### Example Usage - - -```python -from mistralai.client import Mistral -import os - - -with Mistral( - api_key=os.getenv("MISTRAL_API_KEY"), -) as mistral: - - res = mistral.beta.rag.search_indexes.get_deployment_summaries() - - # 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.GetDeploymentSummariesResponse](../../models/getdeploymentsummariesresponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## register_deployment - -Register (or re-register) a search index - -### Example Usage - - -```python -from mistralai.client import Mistral -import os - - -with Mistral( - api_key=os.getenv("MISTRAL_API_KEY"), -) as mistral: - - res = mistral.beta.rag.search_indexes.register_deployment(name="", deployment={ - "type": "vespa", - "vespa_version": "", - "indexes": [], - "query_url": "https://joyful-granny.info", - }, status="offline") - - # Handle response - print(res) - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `deployment` | [models.RegisterDeploymentRequestDeploymentDeployment](../../models/registerdeploymentrequestdeploymentdeployment.md) | :heavy_check_mark: | N/A | -| `status` | [Optional[models.RegisterDeploymentRequestDeploymentStatus]](../../models/registerdeploymentrequestdeploymentstatus.md) | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - -### Response - -**[models.RegisterSearchIndexResponseIndex](../../models/registersearchindexresponseindex.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.HTTPValidationError | 422 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## unregister_deployment - -Delete all information about a deployment - -### Example Usage - - -```python -from mistralai.client import Mistral -import os - - -with Mistral( - api_key=os.getenv("MISTRAL_API_KEY"), -) as mistral: - - res = mistral.beta.rag.search_indexes.unregister_deployment(deployment_id="240a5e63-fd68-4806-8290-04cce22b4c37") - - # Handle response - print(res) - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `deployment_id` | *str* | :heavy_check_mark: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - -### Response - -**[Any](../../models/.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.HTTPValidationError | 422 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## update_index_metrics - -Update the metrics for a given index - -### Example Usage - - -```python -from mistralai.client import Mistral -import os - - -with Mistral( - api_key=os.getenv("MISTRAL_API_KEY"), -) as mistral: - - res = mistral.beta.rag.search_indexes.update_index_metrics(deployment_id="b0c2f463-8aef-437d-83ac-d4bfae874584", request_body={ - "status": "offline", - "clear_metrics": False, - }) - - # Handle response - print(res) - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `deployment_id` | *str* | :heavy_check_mark: | N/A | -| `request_body` | [models.MetricsData](../../models/metricsdata.md) | :heavy_check_mark: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - -### Response - -**[Any](../../models/.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/contextsearchindexes/README.md b/docs/sdks/searchindexes/README.md similarity index 100% rename from docs/sdks/contextsearchindexes/README.md rename to docs/sdks/searchindexes/README.md diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index 3a119168c..0e3c8fa04 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -74,26 +74,28 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `provider` | [models.WebhookProvider](../../models/webhookprovider.md) | :heavy_check_mark: | N/A | -| `name` | *str* | :heavy_check_mark: | Human-readable name for this webhook | -| `owner_type` | [Optional[models.TriggersOwnerType]](../../models/triggersownertype.md) | :heavy_minus_sign: | N/A | -| `secret` | *OptionalNullable[str]* | :heavy_minus_sign: | Signing secret provided by the third-party provider | -| `encryption_key` | *OptionalNullable[str]* | :heavy_minus_sign: | Encryption key used to decrypt webhook payloads | -| `url_verification_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token the provider echoes back when verifying the URL. Required for WhatsApp (paste the same value in the Verify token field of the Meta App Dashboard), forbidden for other providers | -| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | -| `signature_hash_algorithm` | [OptionalNullable[models.WebhookSignatureHashAlgorithm]](../../models/webhooksignaturehashalgorithm.md) | :heavy_minus_sign: | N/A | -| `signature_header_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `validity_period_second` | *OptionalNullable[int]* | :heavy_minus_sign: | Maximum allowed drift in seconds between the signed timestamp and reception time, eg 300 | -| `signature_extractor_regex` | *OptionalNullable[str]* | :heavy_minus_sign: | Regex to extract signature, eg sha256=(.*) | -| `timestamp_extractor_regex` | *OptionalNullable[str]* | :heavy_minus_sign: | Regex to extract the timestamp from the signature header, used as {timestamp}, eg t=([^,]+) | -| `signature_payload_pattern` | *OptionalNullable[str]* | :heavy_minus_sign: | Pattern for signature payload, eg {body} or {timestamp}.{body} | -| `signature_encoding` | [OptionalNullable[models.WebhookSignatureEncoding]](../../models/webhooksignatureencoding.md) | :heavy_minus_sign: | N/A | -| `success_status_code` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `event_type_pattern` | *OptionalNullable[str]* | :heavy_minus_sign: | Pattern for the event type, with {body.} and {headers.} placeholders, eg {body.type} or {headers.X-GitHub-Event} | -| `event_id_pattern` | *OptionalNullable[str]* | :heavy_minus_sign: | Pattern for a unique event identifier used to deduplicate deliveries, with {body.} and {headers.} placeholders, eg {body.id} or {body.event_id}.{headers.X-Delivery-Id}. Defaults to a hash of the request body | -| `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 | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `provider` | [models.WebhookProvider](../../models/webhookprovider.md) | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | Human-readable name for this webhook | +| `owner_type` | [Optional[models.TriggersOwnerType]](../../models/triggersownertype.md) | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | What this webhook is used for | +| `secret` | *OptionalNullable[str]* | :heavy_minus_sign: | Signing secret provided by the third-party provider | +| `encryption_key` | *OptionalNullable[str]* | :heavy_minus_sign: | Encryption key used to decrypt webhook payloads | +| `url_verification_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token the provider echoes back when verifying the URL. Required for WhatsApp (paste the same value in the Verify token field of the Meta App Dashboard), forbidden for other providers | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `signature_hash_algorithm` | [OptionalNullable[models.WebhookSignatureHashAlgorithm]](../../models/webhooksignaturehashalgorithm.md) | :heavy_minus_sign: | N/A | +| `signature_header_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `validity_period_second` | *OptionalNullable[int]* | :heavy_minus_sign: | Maximum allowed drift in seconds between the signed timestamp and reception time, eg 300 | +| `signature_extractor_regex` | *OptionalNullable[str]* | :heavy_minus_sign: | Regex to extract signature, eg sha256=(.*) | +| `timestamp_extractor_regex` | *OptionalNullable[str]* | :heavy_minus_sign: | Regex to extract the timestamp from the rendered timestamp_pattern (the signature header by default), used as {timestamp}, eg t=([^,]+). Defaults to the whole value when timestamp_pattern is set | +| `timestamp_pattern` | *OptionalNullable[str]* | :heavy_minus_sign: | Pattern for the timestamp used as {timestamp}, with {body.} and {headers.} placeholders, eg {headers.X-Slack-Request-Timestamp} or {body.webhookTimestamp}. Defaults to the signature header when timestamp_extractor_regex is set | +| `signature_payload_pattern` | *OptionalNullable[str]* | :heavy_minus_sign: | Pattern for signature payload, eg {body} or {timestamp}.{body} | +| `signature_encoding` | [OptionalNullable[models.WebhookSignatureEncoding]](../../models/webhooksignatureencoding.md) | :heavy_minus_sign: | N/A | +| `success_status_code` | *OptionalNullable[int]* | :heavy_minus_sign: | HTTP status code returned for accepted deliveries, eg 200 | +| `event_type_pattern` | *OptionalNullable[str]* | :heavy_minus_sign: | Pattern for the event type, with {body.} and {headers.} placeholders, eg {body.type} or {headers.X-GitHub-Event} | +| `event_id_pattern` | *OptionalNullable[str]* | :heavy_minus_sign: | Pattern for a unique event identifier used to deduplicate deliveries, with {body.} and {headers.} placeholders, eg {body.id} or {body.event_id}.{headers.X-Delivery-Id}. Defaults to a hash of the request body | +| `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/workflows/README.md b/docs/sdks/workflows/README.md index f151e5e1b..35e6e904e 100644 --- a/docs/sdks/workflows/README.md +++ b/docs/sdks/workflows/README.md @@ -149,20 +149,21 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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` | *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. | -| `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. | -| `custom_tracing_attributes` | Dict[str, *str*] | :heavy_minus_sign: | N/A | -| `force_new_trace` | *Optional[bool]* | :heavy_minus_sign: | If true, ignore the caller's trace context and start a new, independent trace for this execution instead of joining the caller's trace. | -| `traceparent` | *OptionalNullable[str]* | :heavy_minus_sign: | W3C trace context to join this execution to the caller's trace. Ignored when force_new_trace is set. | -| `extensions` | Dict[str, *Any*] | :heavy_minus_sign: | Plugin-specific data to propagate into WorkflowContext.extensions at execution time. | -| `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_name instead. | -| `deployment_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the deployment to route this execution to | -| `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 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `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` | *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. | +| `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. | +| `custom_tracing_attributes` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `force_new_trace` | *Optional[bool]* | :heavy_minus_sign: | If true, ignore the caller's trace context and start a new, independent trace for this execution instead of joining the caller's trace. | +| `traceparent` | *OptionalNullable[str]* | :heavy_minus_sign: | W3C trace context to join this execution to the caller's trace. Ignored when force_new_trace is set. | +| `extensions` | Dict[str, *Any*] | :heavy_minus_sign: | Plugin-specific data to propagate into WorkflowContext.extensions at execution time. | +| `call_context` | Dict[str, [models.WorkflowExecutionRequestCallContext](../../models/workflowexecutionrequestcallcontext.md)] | :heavy_minus_sign: | Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here. | +| `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_name instead. | +| `deployment_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the deployment to route this execution to | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -202,20 +203,21 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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` | *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. | -| `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. | -| `custom_tracing_attributes` | Dict[str, *str*] | :heavy_minus_sign: | N/A | -| `force_new_trace` | *Optional[bool]* | :heavy_minus_sign: | If true, ignore the caller's trace context and start a new, independent trace for this execution instead of joining the caller's trace. | -| `traceparent` | *OptionalNullable[str]* | :heavy_minus_sign: | W3C trace context to join this execution to the caller's trace. Ignored when force_new_trace is set. | -| `extensions` | Dict[str, *Any*] | :heavy_minus_sign: | Plugin-specific data to propagate into WorkflowContext.extensions at execution time. | -| `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_name instead. | -| `deployment_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the deployment to route this execution to | -| `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 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `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` | *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. | +| `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. | +| `custom_tracing_attributes` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `force_new_trace` | *Optional[bool]* | :heavy_minus_sign: | If true, ignore the caller's trace context and start a new, independent trace for this execution instead of joining the caller's trace. | +| `traceparent` | *OptionalNullable[str]* | :heavy_minus_sign: | W3C trace context to join this execution to the caller's trace. Ignored when force_new_trace is set. | +| `extensions` | Dict[str, *Any*] | :heavy_minus_sign: | Plugin-specific data to propagate into WorkflowContext.extensions at execution time. | +| `call_context` | Dict[str, [models.WorkflowExecutionRequestCallContext](../../models/workflowexecutionrequestcallcontext.md)] | :heavy_minus_sign: | Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here. | +| `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_name instead. | +| `deployment_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the deployment to route this execution to | +| `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/examples/mistral/agents/async_conversation_run.py b/examples/mistral/agents/async_conversation_run.py index bb96ed78a..1d65d64e8 100644 --- a/examples/mistral/agents/async_conversation_run.py +++ b/examples/mistral/agents/async_conversation_run.py @@ -6,7 +6,7 @@ from mistralai.extra.run.context import RunContext from mistralai.client.types import BaseModel -MODEL = "mistral-medium-2505" +MODEL = "mistral-medium-latest" async def main(): diff --git a/examples/mistral/agents/async_conversation_run_code_interpreter.py b/examples/mistral/agents/async_conversation_run_code_interpreter.py index 10c81d77e..5149aff3b 100644 --- a/examples/mistral/agents/async_conversation_run_code_interpreter.py +++ b/examples/mistral/agents/async_conversation_run_code_interpreter.py @@ -6,7 +6,7 @@ from mistralai.extra.run.context import RunContext from mistralai.client.types import BaseModel -MODEL = "mistral-medium-2505" +MODEL = "mistral-medium-latest" def math_question_generator(question_num: int): diff --git a/examples/mistral/jobs/async_batch_job_embeddings_typed.py b/examples/mistral/jobs/async_batch_job_embeddings_typed.py index 1f03d0d37..1153b315c 100644 --- a/examples/mistral/jobs/async_batch_job_embeddings_typed.py +++ b/examples/mistral/jobs/async_batch_job_embeddings_typed.py @@ -38,14 +38,16 @@ async def main(): # anywhere. To run the same input again later, upload it and keep the file id: # payload = BatchInput.from_payload({...}) # f = await batch.upload(payload) # f.file_id -- stash and reuse - # result = await batch.run(f) + # result = await batch.run(f, model="mistral-embed") result = await batch.run( BatchInput.from_payload( { custom_id: EmbeddingRequest(model="mistral-embed", inputs=text) for custom_id, text in texts.items() } - ) + ), + # The Batch API requires the job's model, even when each body names it. + model="mistral-embed", ) print( f"Job {result.job.id}: {result.status} " @@ -68,7 +70,7 @@ async def main(): # time (constant memory). It binds to a job you already own -- create it (or # rehydrate one from a prior process via batch.get(job_id)) and pass the handle; # it reads only, so cleaning up the job and its files stays yours: - # handle = await batch.create(BatchInput.from_payload({...})) + # handle = await batch.create(BatchInput.from_payload({...}), model="mistral-embed") # async for custom_id, item in batch.stream_results(handle): # ... # item is a typed EmbeddingResponse or a BatchRequestError diff --git a/examples/mistral/jobs/async_files.py b/examples/mistral/jobs/async_files.py index 4bec5237d..b863ea24d 100644 --- a/examples/mistral/jobs/async_files.py +++ b/examples/mistral/jobs/async_files.py @@ -15,9 +15,11 @@ async def main(): # Create a new file created_file = await client.files.upload_async( file=File( - file_name="training_file.jsonl", - content=open("examples/fixtures/ft_training_file.jsonl", "rb").read(), - ) + file_name="batch_file.jsonl", + # One Batch API request per line: a custom_id and the request body. + content=b'{"custom_id": "0", "body": {"messages": [{"role": "user", "content": "What is the best French cheese?"}]}}\n', + ), + purpose="batch", ) print(created_file) diff --git a/examples/mistral/jobs/files.py b/examples/mistral/jobs/files.py index 50f6472c1..34632394d 100644 --- a/examples/mistral/jobs/files.py +++ b/examples/mistral/jobs/files.py @@ -14,9 +14,11 @@ def main(): # Create a new file created_file = client.files.upload( file=File( - file_name="training_file.jsonl", - content=open("examples/fixtures/ft_training_file.jsonl", "rb").read(), - ) + file_name="batch_file.jsonl", + # One Batch API request per line: a custom_id and the request body. + content=b'{"custom_id": "0", "body": {"messages": [{"role": "user", "content": "What is the best French cheese?"}]}}\n', + ), + purpose="batch", ) print(created_file) diff --git a/packages/azure/pyproject.toml b/packages/azure/pyproject.toml index f272ff808..ec36a03da 100644 --- a/packages/azure/pyproject.toml +++ b/packages/azure/pyproject.toml @@ -22,9 +22,6 @@ dev = [ [tool.uv] exclude-newer = "2 days" -[tool.setuptools.package-data] -"*" = ["py.typed", "src/mistralai/azure/client/py.typed"] - [tool.hatch.build.targets.sdist] include = ["src/mistralai"] diff --git a/packages/gcp/pyproject.toml b/packages/gcp/pyproject.toml index 2523dc9e3..e4bdfe038 100644 --- a/packages/gcp/pyproject.toml +++ b/packages/gcp/pyproject.toml @@ -28,9 +28,6 @@ dev = [ [tool.uv] exclude-newer = "2 days" -[tool.setuptools.package-data] -"*" = ["py.typed", "src/mistralai/gcp/client/py.typed"] - [tool.hatch.build.targets.sdist] include = ["src/mistralai"] diff --git a/pyproject.toml b/pyproject.toml index ddbe17acf..e77eeb962 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "3.8.0" +version = "3.9.0" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" @@ -104,9 +104,6 @@ default-groups = [ "lint", ] -[tool.setuptools.package-data] -"*" = ["py.typed", "src/mistralai/client/py.typed"] - [tool.hatch.build] dev-mode-dirs = [ "src", diff --git a/src/mistralai/client/_hooks/workflow_encoding_hook.py b/src/mistralai/client/_hooks/workflow_encoding_hook.py index 6f8b22108..070ef16b8 100644 --- a/src/mistralai/client/_hooks/workflow_encoding_hook.py +++ b/src/mistralai/client/_hooks/workflow_encoding_hook.py @@ -264,7 +264,7 @@ async def _decode_schedule_inputs( schedule_def["input"] = decoded_input -def _decrypt_sse_line(line: bytes, payload_encoder: PayloadEncoder) -> bytes: +async def _decrypt_sse_line(line: bytes, payload_encoder: PayloadEncoder) -> bytes: """Decrypt event payloads in an SSE data line.""" if not line.startswith(b"data:"): return line @@ -283,8 +283,10 @@ def _decrypt_sse_line(line: bytes, payload_encoder: PayloadEncoder) -> bytes: if not isinstance(attributes, dict): return line - # Decrypt in place - _decrypt_event_attributes modifies attributes dict - _run_async(_decrypt_event_attributes(attributes, payload_encoder)) + # Decrypt in place - _decrypt_event_attributes modifies attributes dict. + # Awaited on the caller's loop: _run_async would block it with a new + # thread and event loop for every line. + await _decrypt_event_attributes(attributes, payload_encoder) return b"data: " + json.dumps(event_wrapper).encode("utf-8") except (json.JSONDecodeError, Exception) as e: @@ -302,19 +304,19 @@ def __init__(self, original_stream: Any, payload_encoder: PayloadEncoder): async def __aiter__(self) -> AsyncIterator[bytes]: async for chunk in self._original: - for processed in self._process_chunk(chunk): + async for processed in self._process_chunk(chunk): yield processed # Flush remaining buffer if self._buffer: - yield _decrypt_sse_line(self._buffer, self._payload_encoder) + yield await _decrypt_sse_line(self._buffer, self._payload_encoder) - def _process_chunk(self, chunk: bytes): + async def _process_chunk(self, chunk: bytes) -> AsyncIterator[bytes]: self._buffer += chunk lines = self._buffer.split(b"\n") # Keep last incomplete line in buffer self._buffer = lines[-1] for line in lines[:-1]: - yield _decrypt_sse_line(line, self._payload_encoder) + b"\n" + yield await _decrypt_sse_line(line, self._payload_encoder) + b"\n" async def aclose(self) -> None: if hasattr(self._original, "aclose"): diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 9aa8b0e4e..e3d0dd310 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "3.8.0" +__version__: str = "3.9.0" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.956.1" -__user_agent__: str = "speakeasy-sdk/python 3.8.0 2.956.1 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 3.9.0 2.956.1 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/agents.py b/src/mistralai/client/agents.py index 33c5dc7a4..8c44f4099 100644 --- a/src/mistralai/client/agents.py +++ b/src/mistralai/client/agents.py @@ -83,7 +83,7 @@ def complete( :param stop: Stop generation if this token is detected. Or if one of these tokens is detected when providing an array :param random_seed: The seed to use for random sampling. If set, different calls will generate deterministic results. :param metadata: - :param response_format: 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. + :param response_format: 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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt. :param tools: :param tool_choice: :param presence_penalty: 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. @@ -298,7 +298,7 @@ async def complete_async( :param stop: Stop generation if this token is detected. Or if one of these tokens is detected when providing an array :param random_seed: The seed to use for random sampling. If set, different calls will generate deterministic results. :param metadata: - :param response_format: 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. + :param response_format: 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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt. :param tools: :param tool_choice: :param presence_penalty: 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. @@ -515,7 +515,7 @@ def stream( :param stop: Stop generation if this token is detected. Or if one of these tokens is detected when providing an array :param random_seed: The seed to use for random sampling. If set, different calls will generate deterministic results. :param metadata: - :param response_format: 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. + :param response_format: 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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt. :param tools: :param tool_choice: :param presence_penalty: 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. @@ -742,7 +742,7 @@ async def stream_async( :param stop: Stop generation if this token is detected. Or if one of these tokens is detected when providing an array :param random_seed: The seed to use for random sampling. If set, different calls will generate deterministic results. :param metadata: - :param response_format: 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. + :param response_format: 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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt. :param tools: :param tool_choice: :param presence_penalty: 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. diff --git a/src/mistralai/client/beta_context.py b/src/mistralai/client/beta_context.py index d3776b531..a07deef42 100644 --- a/src/mistralai/client/beta_context.py +++ b/src/mistralai/client/beta_context.py @@ -2,12 +2,12 @@ from .basesdk import BaseSDK from .sdkconfiguration import SDKConfiguration -from mistralai.client.context_search_indexes import ContextSearchIndexes +from mistralai.client.search_indexes import SearchIndexes from typing import Optional class BetaContext(BaseSDK): - search_indexes: ContextSearchIndexes + search_indexes: SearchIndexes def __init__( self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None @@ -17,6 +17,6 @@ def __init__( self._init_sdks() def _init_sdks(self): - self.search_indexes = ContextSearchIndexes( + self.search_indexes = SearchIndexes( self.sdk_configuration, parent_ref=self.parent_ref ) diff --git a/src/mistralai/client/chat.py b/src/mistralai/client/chat.py index 73136f813..21886dfe1 100644 --- a/src/mistralai/client/chat.py +++ b/src/mistralai/client/chat.py @@ -173,7 +173,7 @@ def complete( :param stop: Stop generation if this token is detected. Or if one of these tokens is detected when providing an array :param random_seed: The seed to use for random sampling. If set, different calls will generate deterministic results. :param metadata: - :param response_format: 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. + :param response_format: 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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt. :param tools: A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. :param tool_choice: 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. :param presence_penalty: 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. @@ -397,7 +397,7 @@ async def complete_async( :param stop: Stop generation if this token is detected. Or if one of these tokens is detected when providing an array :param random_seed: The seed to use for random sampling. If set, different calls will generate deterministic results. :param metadata: - :param response_format: 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. + :param response_format: 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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt. :param tools: A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. :param tool_choice: 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. :param presence_penalty: 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. @@ -623,7 +623,7 @@ def stream( :param stop: Stop generation if this token is detected. Or if one of these tokens is detected when providing an array :param random_seed: The seed to use for random sampling. If set, different calls will generate deterministic results. :param metadata: - :param response_format: 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. + :param response_format: 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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt. :param tools: A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. :param tool_choice: 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. :param presence_penalty: 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. @@ -859,7 +859,7 @@ async def stream_async( :param stop: Stop generation if this token is detected. Or if one of these tokens is detected when providing an array :param random_seed: The seed to use for random sampling. If set, different calls will generate deterministic results. :param metadata: - :param response_format: 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. + :param response_format: 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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt. :param tools: A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. :param tool_choice: 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. :param presence_penalty: 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. diff --git a/src/mistralai/client/classifiers.py b/src/mistralai/client/classifiers.py index aa0f29b1f..84e68f77f 100644 --- a/src/mistralai/client/classifiers.py +++ b/src/mistralai/client/classifiers.py @@ -17,10 +17,10 @@ def moderate( *, model: str, inputs: Union[ - models.ClassificationRequestInputs, - models.ClassificationRequestInputsTypedDict, + models.ModerationRequestInputs, models.ModerationRequestInputsTypedDict ], metadata: OptionalNullable[Mapping[str, Any]] = UNSET, + queries: OptionalNullable[Mapping[str, str]] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -29,8 +29,9 @@ def moderate( r"""Moderations :param model: ID of the model to use. - :param inputs: Text to classify. + :param inputs: Text to moderate. :param metadata: + :param queries: Named moderation queries to evaluate. :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 @@ -49,10 +50,11 @@ def moderate( else: base_url = self._get_url(base_url, url_variables) - request = models.ClassificationRequest( + request = models.ModerationRequest( model=model, metadata=utils.unmarshal(metadata, OptionalNullable[Dict[str, Any]]), - inputs=utils.unmarshal(inputs, models.ClassificationRequestInputs), + queries=utils.unmarshal(queries, OptionalNullable[Dict[str, str]]), + inputs=utils.unmarshal(inputs, models.ModerationRequestInputs), ) req = self._build_request( @@ -69,7 +71,7 @@ def moderate( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.ClassificationRequest + request, False, False, "json", models.ModerationRequest ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -122,10 +124,10 @@ async def moderate_async( *, model: str, inputs: Union[ - models.ClassificationRequestInputs, - models.ClassificationRequestInputsTypedDict, + models.ModerationRequestInputs, models.ModerationRequestInputsTypedDict ], metadata: OptionalNullable[Mapping[str, Any]] = UNSET, + queries: OptionalNullable[Mapping[str, str]] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -134,8 +136,9 @@ async def moderate_async( r"""Moderations :param model: ID of the model to use. - :param inputs: Text to classify. + :param inputs: Text to moderate. :param metadata: + :param queries: Named moderation queries to evaluate. :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 @@ -154,10 +157,11 @@ async def moderate_async( else: base_url = self._get_url(base_url, url_variables) - request = models.ClassificationRequest( + request = models.ModerationRequest( model=model, metadata=utils.unmarshal(metadata, OptionalNullable[Dict[str, Any]]), - inputs=utils.unmarshal(inputs, models.ClassificationRequestInputs), + queries=utils.unmarshal(queries, OptionalNullable[Dict[str, str]]), + inputs=utils.unmarshal(inputs, models.ModerationRequestInputs), ) req = self._build_request_async( @@ -174,7 +178,7 @@ async def moderate_async( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.ClassificationRequest + request, False, False, "json", models.ModerationRequest ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -237,7 +241,7 @@ def moderate_chat( ) -> models.ModerationResponse: r"""Chat Moderations - :param inputs: Chat to classify + :param inputs: Chat to classify. :param model: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -341,7 +345,7 @@ async def moderate_chat_async( ) -> models.ModerationResponse: r"""Chat Moderations - :param inputs: Chat to classify + :param inputs: Chat to classify. :param model: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method diff --git a/src/mistralai/client/datasets.py b/src/mistralai/client/datasets.py index 57699f5c5..9535bfd32 100644 --- a/src/mistralai/client/datasets.py +++ b/src/mistralai/client/datasets.py @@ -31,6 +31,7 @@ def create( *, name: str, description: str, + metadata: Optional[Mapping[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -40,6 +41,7 @@ def create( :param name: :param description: + :param metadata: :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 @@ -61,6 +63,7 @@ def create( request = models.CreateDatasetRequest( name=name, description=description, + metadata=utils.unmarshal(metadata, Optional[Dict[str, Any]]), ) req = self._build_request( @@ -132,6 +135,7 @@ async def create_async( *, name: str, description: str, + metadata: Optional[Mapping[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -141,6 +145,7 @@ async def create_async( :param name: :param description: + :param metadata: :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 @@ -162,6 +167,7 @@ async def create_async( request = models.CreateDatasetRequest( name=name, description=description, + metadata=utils.unmarshal(metadata, Optional[Dict[str, Any]]), ) req = self._build_request_async( @@ -816,6 +822,7 @@ def update( dataset_id: str, name: OptionalNullable[str] = UNSET, description: OptionalNullable[str] = UNSET, + metadata: OptionalNullable[Mapping[str, Any]] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -826,6 +833,7 @@ def update( :param dataset_id: Dataset UUID or workspace-scoped slug. UUID-shaped values are always interpreted as dataset IDs. :param name: :param description: + :param metadata: :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 @@ -849,6 +857,7 @@ def update( update_dataset_request=models.UpdateDatasetRequest( name=name, description=description, + metadata=utils.unmarshal(metadata, OptionalNullable[Dict[str, Any]]), ), ) @@ -926,6 +935,7 @@ async def update_async( dataset_id: str, name: OptionalNullable[str] = UNSET, description: OptionalNullable[str] = UNSET, + metadata: OptionalNullable[Mapping[str, Any]] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -936,6 +946,7 @@ async def update_async( :param dataset_id: Dataset UUID or workspace-scoped slug. UUID-shaped values are always interpreted as dataset IDs. :param name: :param description: + :param metadata: :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 @@ -959,6 +970,7 @@ async def update_async( update_dataset_request=models.UpdateDatasetRequest( name=name, description=description, + metadata=utils.unmarshal(metadata, OptionalNullable[Dict[str, Any]]), ), ) @@ -1462,20 +1474,25 @@ async def create_record_async( raise errors.SDKError("Unexpected response received", http_res) - def import_from_file( + def create_records( self, *, dataset_id: str, - file_id: str, + records: Union[ + Iterable[models.CreateDatasetRecordsItem], + Iterable[models.CreateDatasetRecordsItemTypedDict], + ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.DatasetImportTask: - r"""Populate the dataset with records from an uploaded file + ) -> models.CreateDatasetRecordsResponse: + r"""Add several records to the dataset + + Creates 1 to 100 records in one transaction: if one record is invalid, none is created. Records are returned in the request order. :param dataset_id: Dataset UUID or workspace-scoped slug. UUID-shaped values are always interpreted as dataset IDs. - :param file_id: + :param records: Records to add. They are created together: if one is invalid, none is created. :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 @@ -1494,16 +1511,18 @@ def import_from_file( else: base_url = self._get_url(base_url, url_variables) - request = models.PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequest( + request = models.CreateDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsBulkPostRequest( dataset_id=dataset_id, - import_dataset_from_file_request=models.ImportDatasetFromFileRequest( - file_id=file_id, + create_dataset_records_request=models.CreateDatasetRecordsRequest( + records=utils.get_pydantic_model( + records, List[models.CreateDatasetRecordsItem] + ), ), ) req = self._build_request( method="POST", - path="/v1/observability/datasets/{dataset_id}/imports/from-file", + path="/v1/observability/datasets/{dataset_id}/records/bulk", base_url=base_url, url_variables=url_variables, request=request, @@ -1515,11 +1534,11 @@ def import_from_file( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.import_dataset_from_file_request, + request.create_dataset_records_request, False, False, "json", - models.ImportDatasetFromFileRequest, + models.CreateDatasetRecordsRequest, ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -1537,7 +1556,7 @@ def import_from_file( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="post_dataset_records_from_file_v1_observability_datasets__dataset_id__imports_from_file_post", + operation_id="create_dataset_records_v1_observability_datasets__dataset_id__records_bulk_post", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -1551,8 +1570,10 @@ def import_from_file( ) response_data: Any = None - if utils.match_response(http_res, "202", "application/json"): - return unmarshal_json_response(models.DatasetImportTask, http_res) + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response( + models.CreateDatasetRecordsResponse, http_res + ) if utils.match_response( http_res, ["400", "404", "408", "409", "422"], "application/json" ): @@ -1569,20 +1590,25 @@ def import_from_file( raise errors.SDKError("Unexpected response received", http_res) - async def import_from_file_async( + async def create_records_async( self, *, dataset_id: str, - file_id: str, + records: Union[ + Iterable[models.CreateDatasetRecordsItem], + Iterable[models.CreateDatasetRecordsItemTypedDict], + ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.DatasetImportTask: - r"""Populate the dataset with records from an uploaded file + ) -> models.CreateDatasetRecordsResponse: + r"""Add several records to the dataset + + Creates 1 to 100 records in one transaction: if one record is invalid, none is created. Records are returned in the request order. :param dataset_id: Dataset UUID or workspace-scoped slug. UUID-shaped values are always interpreted as dataset IDs. - :param file_id: + :param records: Records to add. They are created together: if one is invalid, none is created. :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 @@ -1601,16 +1627,18 @@ async def import_from_file_async( else: base_url = self._get_url(base_url, url_variables) - request = models.PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequest( + request = models.CreateDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsBulkPostRequest( dataset_id=dataset_id, - import_dataset_from_file_request=models.ImportDatasetFromFileRequest( - file_id=file_id, + create_dataset_records_request=models.CreateDatasetRecordsRequest( + records=utils.get_pydantic_model( + records, List[models.CreateDatasetRecordsItem] + ), ), ) req = self._build_request_async( method="POST", - path="/v1/observability/datasets/{dataset_id}/imports/from-file", + path="/v1/observability/datasets/{dataset_id}/records/bulk", base_url=base_url, url_variables=url_variables, request=request, @@ -1622,11 +1650,11 @@ async def import_from_file_async( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.import_dataset_from_file_request, + request.create_dataset_records_request, False, False, "json", - models.ImportDatasetFromFileRequest, + models.CreateDatasetRecordsRequest, ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -1644,7 +1672,7 @@ async def import_from_file_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="post_dataset_records_from_file_v1_observability_datasets__dataset_id__imports_from_file_post", + operation_id="create_dataset_records_v1_observability_datasets__dataset_id__records_bulk_post", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -1658,8 +1686,10 @@ async def import_from_file_async( ) response_data: Any = None - if utils.match_response(http_res, "202", "application/json"): - return unmarshal_json_response(models.DatasetImportTask, http_res) + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response( + models.CreateDatasetRecordsResponse, http_res + ) if utils.match_response( http_res, ["400", "404", "408", "409", "422"], "application/json" ): @@ -1676,20 +1706,20 @@ async def import_from_file_async( raise errors.SDKError("Unexpected response received", http_res) - def import_from_playground( + def import_from_file( self, *, dataset_id: str, - conversation_ids: Iterable[str], + file_id: str, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, ) -> models.DatasetImportTask: - r"""Populate the dataset with records from playground conversations + r"""Populate the dataset with records from an uploaded file :param dataset_id: Dataset UUID or workspace-scoped slug. UUID-shaped values are always interpreted as dataset IDs. - :param conversation_ids: + :param file_id: :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 @@ -1708,16 +1738,16 @@ def import_from_playground( else: base_url = self._get_url(base_url, url_variables) - request = models.PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequest( + request = models.PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequest( dataset_id=dataset_id, - import_dataset_from_playground_request=models.ImportDatasetFromPlaygroundRequest( - conversation_ids=utils.unmarshal(conversation_ids, List[str]), + import_dataset_from_file_request=models.ImportDatasetFromFileRequest( + file_id=file_id, ), ) req = self._build_request( method="POST", - path="/v1/observability/datasets/{dataset_id}/imports/from-playground", + path="/v1/observability/datasets/{dataset_id}/imports/from-file", base_url=base_url, url_variables=url_variables, request=request, @@ -1729,11 +1759,11 @@ def import_from_playground( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.import_dataset_from_playground_request, + request.import_dataset_from_file_request, False, False, "json", - models.ImportDatasetFromPlaygroundRequest, + models.ImportDatasetFromFileRequest, ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -1751,7 +1781,7 @@ def import_from_playground( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="post_dataset_records_from_playground_v1_observability_datasets__dataset_id__imports_from_playground_post", + operation_id="post_dataset_records_from_file_v1_observability_datasets__dataset_id__imports_from_file_post", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security @@ -1783,20 +1813,20 @@ def import_from_playground( raise errors.SDKError("Unexpected response received", http_res) - async def import_from_playground_async( + async def import_from_file_async( self, *, dataset_id: str, - conversation_ids: Iterable[str], + file_id: str, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, ) -> models.DatasetImportTask: - r"""Populate the dataset with records from playground conversations + r"""Populate the dataset with records from an uploaded file :param dataset_id: Dataset UUID or workspace-scoped slug. UUID-shaped values are always interpreted as dataset IDs. - :param conversation_ids: + :param file_id: :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 @@ -1815,16 +1845,16 @@ async def import_from_playground_async( else: base_url = self._get_url(base_url, url_variables) - request = models.PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequest( + request = models.PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequest( dataset_id=dataset_id, - import_dataset_from_playground_request=models.ImportDatasetFromPlaygroundRequest( - conversation_ids=utils.unmarshal(conversation_ids, List[str]), + import_dataset_from_file_request=models.ImportDatasetFromFileRequest( + file_id=file_id, ), ) req = self._build_request_async( method="POST", - path="/v1/observability/datasets/{dataset_id}/imports/from-playground", + path="/v1/observability/datasets/{dataset_id}/imports/from-file", base_url=base_url, url_variables=url_variables, request=request, @@ -1836,11 +1866,11 @@ async def import_from_playground_async( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.import_dataset_from_playground_request, + request.import_dataset_from_file_request, False, False, "json", - models.ImportDatasetFromPlaygroundRequest, + models.ImportDatasetFromFileRequest, ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -1858,7 +1888,7 @@ async def import_from_playground_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="post_dataset_records_from_playground_v1_observability_datasets__dataset_id__imports_from_playground_post", + operation_id="post_dataset_records_from_file_v1_observability_datasets__dataset_id__imports_from_file_post", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security diff --git a/src/mistralai/client/deployments.py b/src/mistralai/client/deployments.py index 739eee2cc..d750bc750 100644 --- a/src/mistralai/client/deployments.py +++ b/src/mistralai/client/deployments.py @@ -2283,6 +2283,210 @@ async def get_deployment_archive_async( raise errors.SDKError("Unexpected response received", http_res) + def create_deployment_archive( + self, + *, + size: int, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DeploymentArchiveUploadResponse: + r"""Create Deployment Archive + + Create an empty archive, with a signed URL to upload the tarball a managed deployment builds from. + + PUT the gzipped tar to `upload_url` with `upload_headers`, then pass `archive_id` in the spec on create or update. + + :param size: Size of the gzipped tar in bytes, at most 256 MiB. The upload URL accepts exactly this size. + :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 timeout_ms is None: + timeout_ms = 300000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateDeploymentArchiveRequest( + size=size, + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/deployments/archives", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + 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, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.CreateDeploymentArchiveRequest + ), + 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="create_deployment_archive_v1_workflows_deployments_archives_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["workflows.deployments"], + extensions=None, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response( + models.DeploymentArchiveUploadResponse, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, 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 create_deployment_archive_async( + self, + *, + size: int, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DeploymentArchiveUploadResponse: + r"""Create Deployment Archive + + Create an empty archive, with a signed URL to upload the tarball a managed deployment builds from. + + PUT the gzipped tar to `upload_url` with `upload_headers`, then pass `archive_id` in the spec on create or update. + + :param size: Size of the gzipped tar in bytes, at most 256 MiB. The upload URL accepts exactly this size. + :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 timeout_ms is None: + timeout_ms = 300000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateDeploymentArchiveRequest( + size=size, + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/deployments/archives", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + 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, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.CreateDeploymentArchiveRequest + ), + 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="create_deployment_archive_v1_workflows_deployments_archives_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["workflows.deployments"], + extensions=None, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response( + models.DeploymentArchiveUploadResponse, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, 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) + def get_deployment_logs( self, *, diff --git a/src/mistralai/client/embeddings.py b/src/mistralai/client/embeddings.py index 4f8388f1c..596828266 100644 --- a/src/mistralai/client/embeddings.py +++ b/src/mistralai/client/embeddings.py @@ -59,10 +59,10 @@ def create( request = models.EmbeddingRequest( model=model, metadata=utils.unmarshal(metadata, OptionalNullable[Dict[str, Any]]), - inputs=utils.unmarshal(inputs, models.EmbeddingRequestInputs), output_dimension=output_dimension, output_dtype=output_dtype, encoding_format=encoding_format, + inputs=utils.get_pydantic_model(inputs, models.EmbeddingRequestInputs), ) req = self._build_request( @@ -174,10 +174,10 @@ async def create_async( request = models.EmbeddingRequest( model=model, metadata=utils.unmarshal(metadata, OptionalNullable[Dict[str, Any]]), - inputs=utils.unmarshal(inputs, models.EmbeddingRequestInputs), output_dimension=output_dimension, output_dtype=output_dtype, encoding_format=encoding_format, + inputs=utils.get_pydantic_model(inputs, models.EmbeddingRequestInputs), ) req = self._build_request_async( diff --git a/src/mistralai/client/executions.py b/src/mistralai/client/executions.py index 84912c937..0d4c5b79e 100644 --- a/src/mistralai/client/executions.py +++ b/src/mistralai/client/executions.py @@ -7,7 +7,7 @@ from mistralai.client.types import OptionalNullable, UNSET from mistralai.client.utils import eventstreaming, get_security_from_env from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response -from typing import Any, Iterable, List, Mapping, Optional, Union +from typing import Any, Dict, Iterable, List, Mapping, Optional, Union class Executions(BaseSDK): @@ -406,6 +406,12 @@ def signal_workflow_execution( models.SignalInvocationBodyInputTypedDict, ] ] = UNSET, + call_context: OptionalNullable[ + Union[ + Mapping[str, models.SignalInvocationBodyCallContext], + Mapping[str, models.SignalInvocationBodyCallContextTypedDict], + ] + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -416,6 +422,7 @@ def signal_workflow_execution( :param execution_id: :param name: The name of the signal to send :param input: Input data for the signal, matching its schema + :param call_context: Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here. :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 @@ -441,6 +448,10 @@ def signal_workflow_execution( input=utils.get_pydantic_model( input, OptionalNullable[models.SignalInvocationBodyInput] ), + call_context=utils.unmarshal( + call_context, + OptionalNullable[Dict[str, models.SignalInvocationBodyCallContext]], + ), ), ) @@ -521,6 +532,12 @@ async def signal_workflow_execution_async( models.SignalInvocationBodyInputTypedDict, ] ] = UNSET, + call_context: OptionalNullable[ + Union[ + Mapping[str, models.SignalInvocationBodyCallContext], + Mapping[str, models.SignalInvocationBodyCallContextTypedDict], + ] + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -531,6 +548,7 @@ async def signal_workflow_execution_async( :param execution_id: :param name: The name of the signal to send :param input: Input data for the signal, matching its schema + :param call_context: Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here. :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 @@ -556,6 +574,10 @@ async def signal_workflow_execution_async( input=utils.get_pydantic_model( input, OptionalNullable[models.SignalInvocationBodyInput] ), + call_context=utils.unmarshal( + call_context, + OptionalNullable[Dict[str, models.SignalInvocationBodyCallContext]], + ), ), ) @@ -1850,6 +1872,12 @@ def update_workflow_execution( models.UpdateInvocationBodyInputTypedDict, ] ] = UNSET, + call_context: OptionalNullable[ + Union[ + Mapping[str, models.UpdateInvocationBodyCallContext], + Mapping[str, models.UpdateInvocationBodyCallContextTypedDict], + ] + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1860,6 +1888,7 @@ def update_workflow_execution( :param execution_id: :param name: The name of the update to request :param input: Input data for the update, matching its schema + :param call_context: Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here. :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 @@ -1885,6 +1914,10 @@ def update_workflow_execution( input=utils.get_pydantic_model( input, OptionalNullable[models.UpdateInvocationBodyInput] ), + call_context=utils.unmarshal( + call_context, + OptionalNullable[Dict[str, models.UpdateInvocationBodyCallContext]], + ), ), ) @@ -1965,6 +1998,12 @@ async def update_workflow_execution_async( models.UpdateInvocationBodyInputTypedDict, ] ] = UNSET, + call_context: OptionalNullable[ + Union[ + Mapping[str, models.UpdateInvocationBodyCallContext], + Mapping[str, models.UpdateInvocationBodyCallContextTypedDict], + ] + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1975,6 +2014,7 @@ async def update_workflow_execution_async( :param execution_id: :param name: The name of the update to request :param input: Input data for the update, matching its schema + :param call_context: Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here. :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 @@ -2000,6 +2040,10 @@ async def update_workflow_execution_async( input=utils.get_pydantic_model( input, OptionalNullable[models.UpdateInvocationBodyInput] ), + call_context=utils.unmarshal( + call_context, + OptionalNullable[Dict[str, models.UpdateInvocationBodyCallContext]], + ), ), ) diff --git a/src/mistralai/client/ingestion_pipeline_configurations.py b/src/mistralai/client/ingestion_pipeline_configurations.py index b8f826ee4..56c18c3ba 100644 --- a/src/mistralai/client/ingestion_pipeline_configurations.py +++ b/src/mistralai/client/ingestion_pipeline_configurations.py @@ -7,7 +7,7 @@ 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 Any, Dict, Iterable, List, Mapping, Optional, Union +from typing import Any, Dict, List, Mapping, Optional class IngestionPipelineConfigurations(BaseSDK): @@ -184,12 +184,6 @@ def register( *, name: str, pipeline_composition: OptionalNullable[Mapping[str, str]] = UNSET, - target_indexes: OptionalNullable[ - Union[ - Iterable[models.IngestionPipelineTargetIndexRef], - Iterable[models.IngestionPipelineTargetIndexRefTypedDict], - ] - ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -201,7 +195,6 @@ def register( :param name: :param pipeline_composition: - :param target_indexes: :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 @@ -225,10 +218,6 @@ def register( pipeline_composition=utils.unmarshal( pipeline_composition, OptionalNullable[Dict[str, str]] ), - target_indexes=utils.get_pydantic_model( - target_indexes, - OptionalNullable[List[models.IngestionPipelineTargetIndexRef]], - ), ) req = self._build_request( @@ -304,12 +293,6 @@ async def register_async( *, name: str, pipeline_composition: OptionalNullable[Mapping[str, str]] = UNSET, - target_indexes: OptionalNullable[ - Union[ - Iterable[models.IngestionPipelineTargetIndexRef], - Iterable[models.IngestionPipelineTargetIndexRefTypedDict], - ] - ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -321,7 +304,6 @@ async def register_async( :param name: :param pipeline_composition: - :param target_indexes: :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 @@ -345,10 +327,6 @@ async def register_async( pipeline_composition=utils.unmarshal( pipeline_composition, OptionalNullable[Dict[str, str]] ), - target_indexes=utils.get_pydantic_model( - target_indexes, - OptionalNullable[List[models.IngestionPipelineTargetIndexRef]], - ), ) req = self._build_request_async( diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 5d2eb4871..92ec99737 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -816,6 +816,10 @@ CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequest, CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequestTypedDict, ) + from .create_dataset_records_v1_observability_datasets_dataset_id_records_bulk_postop import ( + CreateDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsBulkPostRequest, + CreateDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsBulkPostRequestTypedDict, + ) from .create_index_v1_context_search_indexes_postop import ( CreateIndexV1ContextSearchIndexesPostResponse, CreateIndexV1ContextSearchIndexesPostResponseTypedDict, @@ -845,10 +849,27 @@ CreateDatasetRecordRequestSource, CreateDatasetRecordRequestTypedDict, ) + from .createdatasetrecordsitem import ( + CreateDatasetRecordsItem, + CreateDatasetRecordsItemSource, + CreateDatasetRecordsItemTypedDict, + ) + from .createdatasetrecordsrequest import ( + CreateDatasetRecordsRequest, + CreateDatasetRecordsRequestTypedDict, + ) + from .createdatasetrecordsresponse import ( + CreateDatasetRecordsResponse, + CreateDatasetRecordsResponseTypedDict, + ) from .createdatasetrequest import ( CreateDatasetRequest, CreateDatasetRequestTypedDict, ) + from .createdeploymentarchiverequest import ( + CreateDeploymentArchiveRequest, + CreateDeploymentArchiveRequestTypedDict, + ) from .createdeploymentrequest import ( CreateDeploymentRequest, CreateDeploymentRequestTypedDict, @@ -1142,6 +1163,10 @@ DeploymentArchiveResponse, DeploymentArchiveResponseTypedDict, ) + from .deploymentarchiveuploadresponse import ( + DeploymentArchiveUploadResponse, + DeploymentArchiveUploadResponseTypedDict, + ) from .deploymentbuildstate import ( DeploymentBuildState, DeploymentBuildStateTypedDict, @@ -1211,6 +1236,8 @@ DetectionDefinitionV1TypedDict, ) from .detectionpattern import DetectionPattern, DetectionPatternTypedDict + from .displayformat import DisplayFormat + from .displayspec import DisplaySpec, DisplaySpecTypedDict from .distancemetric import DistanceMetric from .document import Document, DocumentTypedDict from .documentfielderrorresponse import ( @@ -1238,6 +1265,7 @@ ResourceTypedDict, ) from .embeddingdtype import EmbeddingDtype + from .embeddinginput import EmbeddingInput, EmbeddingInputTypedDict from .embeddingrequest import ( EmbeddingRequest, EmbeddingRequestInputs, @@ -1294,6 +1322,10 @@ EvaluationRunRecordV2Response, EvaluationRunRecordV2ResponseTypedDict, ) + from .evaluationrunrunscorev2 import ( + EvaluationRunRunScoreV2, + EvaluationRunRunScoreV2TypedDict, + ) from .evaluationrunscorev2 import ( EvaluationRunScoreV2, EvaluationRunScoreV2TypedDict, @@ -1715,26 +1747,6 @@ GetWorkflowsV1WorkflowsGetStatusTypedDict, ) from .getbudgetresponse import GetBudgetResponse, GetBudgetResponseTypedDict - from .getdeploymentsummariesresponse import ( - GetDeploymentSummariesResponse, - GetDeploymentSummariesResponseTypedDict, - ) - from .getdeploymentsummariesresponsedeployment import ( - GetDeploymentSummariesResponseDeployment, - GetDeploymentSummariesResponseDeploymentDeployment, - GetDeploymentSummariesResponseDeploymentDeploymentTypedDict, - GetDeploymentSummariesResponseDeploymentStatus, - GetDeploymentSummariesResponseDeploymentTypedDict, - UnknownGetDeploymentSummariesResponseDeploymentDeployment, - ) - from .getdeploymentsummariesresponsevespadeployment import ( - GetDeploymentSummariesResponseVespaDeployment, - GetDeploymentSummariesResponseVespaDeploymentTypedDict, - ) - from .getdeploymentsummariesresponsevespaindex import ( - GetDeploymentSummariesResponseVespaIndex, - GetDeploymentSummariesResponseVespaIndexTypedDict, - ) from .getfileresponse import GetFileResponse, GetFileResponseTypedDict from .getlog import GetLog, GetLogTypedDict from .getlogfieldoptions import GetLogFieldOptions, GetLogFieldOptionsTypedDict @@ -1832,10 +1844,6 @@ ImportDatasetFromFileRequest, ImportDatasetFromFileRequestTypedDict, ) - from .importdatasetfromplaygroundrequest import ( - ImportDatasetFromPlaygroundRequest, - ImportDatasetFromPlaygroundRequestTypedDict, - ) from .importdatasetfromspansrequest import ( ImportDatasetFromSpansRequest, ImportDatasetFromSpansRequestTypedDict, @@ -1860,10 +1868,6 @@ IngestionPipelineConfiguration, IngestionPipelineConfigurationTypedDict, ) - from .ingestionpipelinetargetindexref import ( - IngestionPipelineTargetIndexRef, - IngestionPipelineTargetIndexRefTypedDict, - ) from .inputentries import InputEntries, InputEntriesTypedDict from .inputs import Inputs, InputsTypedDict from .instructrequest import ( @@ -2311,6 +2315,12 @@ from .metadatafiltergroup import MetadataFilterGroup, MetadataFilterGroupTypedDict from .metricaggregation import MetricAggregation from .metricdefinition import MetricDefinition, MetricDefinitionTypedDict + from .metricdirectionspec import ( + MetricDirectionSpec, + MetricDirectionSpecDirection, + MetricDirectionSpecTypedDict, + ) + from .missinggoalitem import MissingGoalItem, MissingGoalItemTypedDict from .mistralembeddingmodel import ( MistralEmbeddingModel, MistralEmbeddingModelTypedDict, @@ -2353,6 +2363,12 @@ ModerationLlmv2ConfigTypedDict, ) from .moderationobject import ModerationObject, ModerationObjectTypedDict + from .moderationrequest import ( + ModerationRequest, + ModerationRequestInputs, + ModerationRequestInputsTypedDict, + ModerationRequestTypedDict, + ) from .moderationresponse import ModerationResponse, ModerationResponseTypedDict from .navigate_index_v1_context_search_indexes_index_name_navigate_postop import ( NavigateIndexV1ContextSearchIndexesIndexNameNavigatePostRequest, @@ -2379,6 +2395,7 @@ from .oauth2authorizationcodeauthmethod import ( OAuth2AuthorizationCodeAuthMethod, OAuth2AuthorizationCodeAuthMethodTypedDict, + TokenEndpointAuthMethod, ) from .oauth2clientcredentialsauthmethod import ( OAuth2ClientCredentialsAuthMethod, @@ -2590,10 +2607,6 @@ PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequest, PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequestTypedDict, ) - from .post_dataset_records_from_playground_v1_observability_datasets_dataset_id_imports_from_playground_postop import ( - PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequest, - PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequestTypedDict, - ) from .post_dataset_records_from_spans_v1_observability_datasets_dataset_id_imports_from_spans_postop import ( PostDatasetRecordsFromSpansV1ObservabilityDatasetsDatasetIDImportsFromSpansPostRequest, PostDatasetRecordsFromSpansV1ObservabilityDatasetsDatasetIDImportsFromSpansPostRequestTypedDict, @@ -2650,6 +2663,7 @@ UpdatePromptRequestTypedDict, ) from .promptscapability import PromptsCapability, PromptsCapabilityTypedDict + from .prompttokensdetails import PromptTokensDetails, PromptTokensDetailsTypedDict from .promptvariable import PromptVariable, PromptVariableTypedDict from .promptversion import PromptVersion, PromptVersionTypedDict from .publicauthenticationmethod import ( @@ -2780,29 +2794,6 @@ ReferenceID, ReferenceIDTypedDict, ) - from .registerdeploymentrequestdeployment import ( - RegisterDeploymentRequestDeployment, - RegisterDeploymentRequestDeploymentDeployment, - RegisterDeploymentRequestDeploymentDeploymentTypedDict, - RegisterDeploymentRequestDeploymentStatus, - RegisterDeploymentRequestDeploymentTypedDict, - ) - from .registerdeploymentrequestvespadeployment import ( - RegisterDeploymentRequestVespaDeployment, - RegisterDeploymentRequestVespaDeploymentTypedDict, - ) - from .registerdeploymentrequestvespafield import ( - RegisterDeploymentRequestVespaField, - RegisterDeploymentRequestVespaFieldTypedDict, - ) - from .registerdeploymentrequestvespaindex import ( - RegisterDeploymentRequestVespaIndex, - RegisterDeploymentRequestVespaIndexTypedDict, - ) - from .registersearchindexresponseindex import ( - RegisterSearchIndexResponseIndex, - RegisterSearchIndexResponseIndexTypedDict, - ) from .registrysharingscope import RegistrySharingScope from .rejecteddocumentresponse import ( RejectedDocumentResponse, @@ -3190,10 +3181,6 @@ ScheduleRecentExecution, ScheduleRecentExecutionTypedDict, ) - from .schemafielddatatype import SchemaFieldDataType - from .schemafieldindex import SchemaFieldIndex - from .schemafieldrankingtype import SchemaFieldRankingType - from .schemafieldstorage import SchemaFieldStorage from .scorefilter import ( ScoreFilter, ScoreFilterTypedDict, @@ -3201,6 +3188,12 @@ ScoreFilterValueTypedDict, ) from .scorefiltergroup import ScoreFilterGroup, ScoreFilterGroupTypedDict + from .scoremetric import ( + ScoreMetric, + ScoreMetricTypedDict, + ScoreMetricValue, + ScoreMetricValueTypedDict, + ) from .scoreoperator import ScoreOperator from .scorer import Scorer, ScorerTypedDict from .scorerkind import ScorerKind @@ -3298,6 +3291,8 @@ from .signaldefinition import SignalDefinition, SignalDefinitionTypedDict from .signalinvocationbody import ( SignalInvocationBody, + SignalInvocationBodyCallContext, + SignalInvocationBodyCallContextTypedDict, SignalInvocationBodyInput, SignalInvocationBodyInputTypedDict, SignalInvocationBodyNetworkEncodedInput, @@ -3752,10 +3747,6 @@ UnhardenDeploymentV1WorkflowsDeploymentsDeploymentIDUnhardenPostRequest, UnhardenDeploymentV1WorkflowsDeploymentsDeploymentIDUnhardenPostRequestTypedDict, ) - from .unregister_deployment_v1_rag_deployments_deployment_id_deleteop import ( - UnregisterDeploymentV1RagDeploymentsDeploymentIDDeleteRequest, - UnregisterDeploymentV1RagDeploymentsDeploymentIDDeleteRequestTypedDict, - ) from .unschedule_workflow_v1_workflows_schedules_schedule_id_deleteop import ( UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequest, UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequestTypedDict, @@ -3784,12 +3775,6 @@ UpdateDeploymentV1WorkflowsDeploymentsNamePatchRequest, UpdateDeploymentV1WorkflowsDeploymentsNamePatchRequestTypedDict, ) - from .update_index_metrics_v1_rag_deployments_deployment_id_metrics_putop import ( - MetricsData, - MetricsDataTypedDict, - UpdateIndexMetricsV1RagDeploymentsDeploymentIDMetricsPutRequest, - UpdateIndexMetricsV1RagDeploymentsDeploymentIDMetricsPutRequestTypedDict, - ) from .update_index_v1_context_search_indexes_index_name_putop import ( UpdateIndexV1ContextSearchIndexesIndexNamePutRequest, UpdateIndexV1ContextSearchIndexesIndexNamePutRequestTypedDict, @@ -3865,6 +3850,8 @@ ) from .updateinvocationbody import ( UpdateInvocationBody, + UpdateInvocationBodyCallContext, + UpdateInvocationBodyCallContextTypedDict, UpdateInvocationBodyInput, UpdateInvocationBodyInputTypedDict, UpdateInvocationBodyTypedDict, @@ -3877,18 +3864,6 @@ UpdateManagedIndexRequest, UpdateManagedIndexRequestTypedDict, ) - from .updatemetricsrequestdeploymentmetricsoffline import ( - UpdateMetricsRequestDeploymentMetricsOffline, - UpdateMetricsRequestDeploymentMetricsOfflineTypedDict, - ) - from .updatemetricsrequestdeploymentmetricsonline import ( - UpdateMetricsRequestDeploymentMetricsOnline, - UpdateMetricsRequestDeploymentMetricsOnlineTypedDict, - ) - from .updatemetricsrequestindexmetrics import ( - UpdateMetricsRequestIndexMetrics, - UpdateMetricsRequestIndexMetricsTypedDict, - ) from .updatemodelrequest import UpdateModelRequest, UpdateModelRequestTypedDict from .updatepipelinerequest import ( UpdatePipelineRequest, @@ -4134,6 +4109,8 @@ ) from .workflowexecutionrequest import ( WorkflowExecutionRequest, + WorkflowExecutionRequestCallContext, + WorkflowExecutionRequestCallContextTypedDict, WorkflowExecutionRequestTypedDict, ) from .workflowexecutionresponse import ( @@ -4847,8 +4824,19 @@ "CreateDatasetRecordRequestTypedDict", "CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequest", "CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequestTypedDict", + "CreateDatasetRecordsItem", + "CreateDatasetRecordsItemSource", + "CreateDatasetRecordsItemTypedDict", + "CreateDatasetRecordsRequest", + "CreateDatasetRecordsRequestTypedDict", + "CreateDatasetRecordsResponse", + "CreateDatasetRecordsResponseTypedDict", + "CreateDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsBulkPostRequest", + "CreateDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsBulkPostRequestTypedDict", "CreateDatasetRequest", "CreateDatasetRequestTypedDict", + "CreateDeploymentArchiveRequest", + "CreateDeploymentArchiveRequestTypedDict", "CreateDeploymentRequest", "CreateDeploymentRequestTypedDict", "CreateFileResponse", @@ -5036,6 +5024,8 @@ "DenseVectorFieldDefinitionTypedDict", "DeploymentArchiveResponse", "DeploymentArchiveResponseTypedDict", + "DeploymentArchiveUploadResponse", + "DeploymentArchiveUploadResponseTypedDict", "DeploymentBuildState", "DeploymentBuildStateTypedDict", "DeploymentDetailResponse", @@ -5079,6 +5069,9 @@ "DetectionDefinitionV1TypedDict", "DetectionPattern", "DetectionPatternTypedDict", + "DisplayFormat", + "DisplaySpec", + "DisplaySpecTypedDict", "DistanceMetric", "Document", "DocumentFieldErrorResponse", @@ -5106,6 +5099,8 @@ "EmbeddedResourceTypedDict", "Embedding", "EmbeddingDtype", + "EmbeddingInput", + "EmbeddingInputTypedDict", "EmbeddingRequest", "EmbeddingRequestInputs", "EmbeddingRequestInputsTypedDict", @@ -5146,6 +5141,8 @@ "EvaluationRunRecordFilterInputTypedDict", "EvaluationRunRecordV2Response", "EvaluationRunRecordV2ResponseTypedDict", + "EvaluationRunRunScoreV2", + "EvaluationRunRunScoreV2TypedDict", "EvaluationRunScoreV2", "EvaluationRunScoreV2TypedDict", "EvaluationRunV2Response", @@ -5296,17 +5293,6 @@ "GetDeploymentLogsOrder", "GetDeploymentLogsRequest", "GetDeploymentLogsRequestTypedDict", - "GetDeploymentSummariesResponse", - "GetDeploymentSummariesResponseDeployment", - "GetDeploymentSummariesResponseDeploymentDeployment", - "GetDeploymentSummariesResponseDeploymentDeploymentTypedDict", - "GetDeploymentSummariesResponseDeploymentStatus", - "GetDeploymentSummariesResponseDeploymentTypedDict", - "GetDeploymentSummariesResponseTypedDict", - "GetDeploymentSummariesResponseVespaDeployment", - "GetDeploymentSummariesResponseVespaDeploymentTypedDict", - "GetDeploymentSummariesResponseVespaIndex", - "GetDeploymentSummariesResponseVespaIndexTypedDict", "GetDeploymentV1WorkflowsDeploymentsNameGetRequest", "GetDeploymentV1WorkflowsDeploymentsNameGetRequestTypedDict", "GetEvaluationRunRecordV2V1ObservabilityEvaluationRunsV2RunIDRecordsRecordIDGetRequest", @@ -5512,8 +5498,6 @@ "ImportDatasetFromDatasetRequestTypedDict", "ImportDatasetFromFileRequest", "ImportDatasetFromFileRequestTypedDict", - "ImportDatasetFromPlaygroundRequest", - "ImportDatasetFromPlaygroundRequestTypedDict", "ImportDatasetFromSpansRequest", "ImportDatasetFromSpansRequestTypedDict", "In", @@ -5528,8 +5512,6 @@ "IngestDocumentsV1ContextSearchIndexesIndexNameDocumentsPostRequestTypedDict", "IngestionPipelineConfiguration", "IngestionPipelineConfigurationTypedDict", - "IngestionPipelineTargetIndexRef", - "IngestionPipelineTargetIndexRefTypedDict", "InputEntries", "InputEntriesTypedDict", "Inputs", @@ -5833,10 +5815,13 @@ "MetricAggregation", "MetricDefinition", "MetricDefinitionTypedDict", + "MetricDirectionSpec", + "MetricDirectionSpecDirection", + "MetricDirectionSpecTypedDict", "MetricValue", "MetricValueTypedDict", - "MetricsData", - "MetricsDataTypedDict", + "MissingGoalItem", + "MissingGoalItemTypedDict", "MistralEmbeddingModel", "MistralEmbeddingModelTypedDict", "MistralPromptMode", @@ -5863,6 +5848,10 @@ "ModerationLlmv2ConfigTypedDict", "ModerationObject", "ModerationObjectTypedDict", + "ModerationRequest", + "ModerationRequestInputs", + "ModerationRequestInputsTypedDict", + "ModerationRequestTypedDict", "ModerationResponse", "ModerationResponseTypedDict", "MultiPartBodyParams", @@ -6066,8 +6055,6 @@ "PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIDImportsFromDatasetPostRequestTypedDict", "PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequest", "PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequestTypedDict", - "PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequest", - "PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequestTypedDict", "PostDatasetRecordsFromSpansV1ObservabilityDatasetsDatasetIDImportsFromSpansPostRequest", "PostDatasetRecordsFromSpansV1ObservabilityDatasetsDatasetIDImportsFromSpansPostRequestTypedDict", "Prediction", @@ -6092,6 +6079,8 @@ "PromptCacheRetention", "PromptDefinition", "PromptDefinitionTypedDict", + "PromptTokensDetails", + "PromptTokensDetailsTypedDict", "PromptTypedDict", "PromptVariable", "PromptVariableTypedDict", @@ -6199,19 +6188,6 @@ "ReferenceChunkTypedDict", "ReferenceID", "ReferenceIDTypedDict", - "RegisterDeploymentRequestDeployment", - "RegisterDeploymentRequestDeploymentDeployment", - "RegisterDeploymentRequestDeploymentDeploymentTypedDict", - "RegisterDeploymentRequestDeploymentStatus", - "RegisterDeploymentRequestDeploymentTypedDict", - "RegisterDeploymentRequestVespaDeployment", - "RegisterDeploymentRequestVespaDeploymentTypedDict", - "RegisterDeploymentRequestVespaField", - "RegisterDeploymentRequestVespaFieldTypedDict", - "RegisterDeploymentRequestVespaIndex", - "RegisterDeploymentRequestVespaIndexTypedDict", - "RegisterSearchIndexResponseIndex", - "RegisterSearchIndexResponseIndexTypedDict", "RegistrySharingScope", "RejectedDocumentResponse", "RejectedDocumentResponseTypedDict", @@ -6508,10 +6484,6 @@ "ScheduleRangeTypedDict", "ScheduleRecentExecution", "ScheduleRecentExecutionTypedDict", - "SchemaFieldDataType", - "SchemaFieldIndex", - "SchemaFieldRankingType", - "SchemaFieldStorage", "Scope", "ScoreFilter", "ScoreFilterGroup", @@ -6519,6 +6491,10 @@ "ScoreFilterTypedDict", "ScoreFilterValue", "ScoreFilterValueTypedDict", + "ScoreMetric", + "ScoreMetricTypedDict", + "ScoreMetricValue", + "ScoreMetricValueTypedDict", "ScoreOperator", "ScoreSortInput", "ScoreSortInputTypedDict", @@ -6594,6 +6570,8 @@ "SignalDefinition", "SignalDefinitionTypedDict", "SignalInvocationBody", + "SignalInvocationBodyCallContext", + "SignalInvocationBodyCallContextTypedDict", "SignalInvocationBodyInput", "SignalInvocationBodyInputTypedDict", "SignalInvocationBodyNetworkEncodedInput", @@ -6832,6 +6810,7 @@ "TimestampFieldDefinition", "TimestampFieldDefinitionTypedDict", "TimestampGranularity", + "TokenEndpointAuthMethod", "Tool", "ToolAnnotations", "ToolAnnotationsTypedDict", @@ -6967,7 +6946,6 @@ "UnknownEvaluationResultSpec", "UnknownFallback", "UnknownFieldDefinition", - "UnknownGetDeploymentSummariesResponseDeploymentDeployment", "UnknownHangUpToolFiller", "UnknownJSONPatch", "UnknownJobsAPIRoutesFineTuningUpdateFineTunedModelResponse", @@ -6990,8 +6968,6 @@ "UnknownVoiceAgentDocumentLibraryToolFiller", "UnknownVoiceAgentFunctionToolFiller", "UnknownVoiceAgentWebSearchToolFiller", - "UnregisterDeploymentV1RagDeploymentsDeploymentIDDeleteRequest", - "UnregisterDeploymentV1RagDeploymentsDeploymentIDDeleteRequestTypedDict", "UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequest", "UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequestTypedDict", "UnsupportedStatistics", @@ -7028,11 +7004,11 @@ "UpdateHTTPConnectorRequestAuthMethod2", "UpdateHTTPConnectorRequestAuthMethod2TypedDict", "UpdateHTTPConnectorRequestTypedDict", - "UpdateIndexMetricsV1RagDeploymentsDeploymentIDMetricsPutRequest", - "UpdateIndexMetricsV1RagDeploymentsDeploymentIDMetricsPutRequestTypedDict", "UpdateIndexV1ContextSearchIndexesIndexNamePutRequest", "UpdateIndexV1ContextSearchIndexesIndexNamePutRequestTypedDict", "UpdateInvocationBody", + "UpdateInvocationBodyCallContext", + "UpdateInvocationBodyCallContextTypedDict", "UpdateInvocationBodyInput", "UpdateInvocationBodyInputTypedDict", "UpdateInvocationBodyTypedDict", @@ -7040,12 +7016,6 @@ "UpdateLibraryRequestTypedDict", "UpdateManagedIndexRequest", "UpdateManagedIndexRequestTypedDict", - "UpdateMetricsRequestDeploymentMetricsOffline", - "UpdateMetricsRequestDeploymentMetricsOfflineTypedDict", - "UpdateMetricsRequestDeploymentMetricsOnline", - "UpdateMetricsRequestDeploymentMetricsOnlineTypedDict", - "UpdateMetricsRequestIndexMetrics", - "UpdateMetricsRequestIndexMetricsTypedDict", "UpdateModelRequest", "UpdateModelRequestTypedDict", "UpdatePipelineRequest", @@ -7231,6 +7201,8 @@ "WorkflowExecutionProgressTraceEvent", "WorkflowExecutionProgressTraceEventTypedDict", "WorkflowExecutionRequest", + "WorkflowExecutionRequestCallContext", + "WorkflowExecutionRequestCallContextTypedDict", "WorkflowExecutionRequestTypedDict", "WorkflowExecutionResponse", "WorkflowExecutionResponseTypedDict", @@ -7861,6 +7833,8 @@ "BodyTypedDict": ".create_client_session_v1_client_sessions_postop", "CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequest": ".create_dataset_record_v1_observability_datasets_dataset_id_records_postop", "CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequestTypedDict": ".create_dataset_record_v1_observability_datasets_dataset_id_records_postop", + "CreateDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsBulkPostRequest": ".create_dataset_records_v1_observability_datasets_dataset_id_records_bulk_postop", + "CreateDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsBulkPostRequestTypedDict": ".create_dataset_records_v1_observability_datasets_dataset_id_records_bulk_postop", "CreateIndexV1ContextSearchIndexesPostResponse": ".create_index_v1_context_search_indexes_postop", "CreateIndexV1ContextSearchIndexesPostResponseTypedDict": ".create_index_v1_context_search_indexes_postop", "CreateResponseV1ResponsesPostResponse": ".create_response_v1_responses_postop", @@ -7878,8 +7852,17 @@ "CreateDatasetRecordRequest": ".createdatasetrecordrequest", "CreateDatasetRecordRequestSource": ".createdatasetrecordrequest", "CreateDatasetRecordRequestTypedDict": ".createdatasetrecordrequest", + "CreateDatasetRecordsItem": ".createdatasetrecordsitem", + "CreateDatasetRecordsItemSource": ".createdatasetrecordsitem", + "CreateDatasetRecordsItemTypedDict": ".createdatasetrecordsitem", + "CreateDatasetRecordsRequest": ".createdatasetrecordsrequest", + "CreateDatasetRecordsRequestTypedDict": ".createdatasetrecordsrequest", + "CreateDatasetRecordsResponse": ".createdatasetrecordsresponse", + "CreateDatasetRecordsResponseTypedDict": ".createdatasetrecordsresponse", "CreateDatasetRequest": ".createdatasetrequest", "CreateDatasetRequestTypedDict": ".createdatasetrequest", + "CreateDeploymentArchiveRequest": ".createdeploymentarchiverequest", + "CreateDeploymentArchiveRequestTypedDict": ".createdeploymentarchiverequest", "CreateDeploymentRequest": ".createdeploymentrequest", "CreateDeploymentRequestTypedDict": ".createdeploymentrequest", "CreateFileResponse": ".createfileresponse", @@ -8090,6 +8073,8 @@ "DenseVectorFieldDefinitionTypedDict": ".densevectorfielddefinition", "DeploymentArchiveResponse": ".deploymentarchiveresponse", "DeploymentArchiveResponseTypedDict": ".deploymentarchiveresponse", + "DeploymentArchiveUploadResponse": ".deploymentarchiveuploadresponse", + "DeploymentArchiveUploadResponseTypedDict": ".deploymentarchiveuploadresponse", "DeploymentBuildState": ".deploymentbuildstate", "DeploymentBuildStateTypedDict": ".deploymentbuildstate", "DeploymentDetailResponse": ".deploymentdetailresponse", @@ -8133,6 +8118,9 @@ "DetectionDefinitionV1TypedDict": ".detectiondefinitionv1", "DetectionPattern": ".detectionpattern", "DetectionPatternTypedDict": ".detectionpattern", + "DisplayFormat": ".displayformat", + "DisplaySpec": ".displayspec", + "DisplaySpecTypedDict": ".displayspec", "DistanceMetric": ".distancemetric", "Document": ".document", "DocumentTypedDict": ".document", @@ -8157,6 +8145,8 @@ "Resource": ".embeddedresource", "ResourceTypedDict": ".embeddedresource", "EmbeddingDtype": ".embeddingdtype", + "EmbeddingInput": ".embeddinginput", + "EmbeddingInputTypedDict": ".embeddinginput", "EmbeddingRequest": ".embeddingrequest", "EmbeddingRequestInputs": ".embeddingrequest", "EmbeddingRequestInputsTypedDict": ".embeddingrequest", @@ -8197,6 +8187,8 @@ "SortTypedDict": ".evaluationrunrecordfilterinput", "EvaluationRunRecordV2Response": ".evaluationrunrecordv2response", "EvaluationRunRecordV2ResponseTypedDict": ".evaluationrunrecordv2response", + "EvaluationRunRunScoreV2": ".evaluationrunrunscorev2", + "EvaluationRunRunScoreV2TypedDict": ".evaluationrunrunscorev2", "EvaluationRunScoreV2": ".evaluationrunscorev2", "EvaluationRunScoreV2TypedDict": ".evaluationrunscorev2", "EvaluationRunV2Response": ".evaluationrunv2response", @@ -8464,18 +8456,6 @@ "GetWorkflowsV1WorkflowsGetStatusTypedDict": ".get_workflows_v1_workflows_getop", "GetBudgetResponse": ".getbudgetresponse", "GetBudgetResponseTypedDict": ".getbudgetresponse", - "GetDeploymentSummariesResponse": ".getdeploymentsummariesresponse", - "GetDeploymentSummariesResponseTypedDict": ".getdeploymentsummariesresponse", - "GetDeploymentSummariesResponseDeployment": ".getdeploymentsummariesresponsedeployment", - "GetDeploymentSummariesResponseDeploymentDeployment": ".getdeploymentsummariesresponsedeployment", - "GetDeploymentSummariesResponseDeploymentDeploymentTypedDict": ".getdeploymentsummariesresponsedeployment", - "GetDeploymentSummariesResponseDeploymentStatus": ".getdeploymentsummariesresponsedeployment", - "GetDeploymentSummariesResponseDeploymentTypedDict": ".getdeploymentsummariesresponsedeployment", - "UnknownGetDeploymentSummariesResponseDeploymentDeployment": ".getdeploymentsummariesresponsedeployment", - "GetDeploymentSummariesResponseVespaDeployment": ".getdeploymentsummariesresponsevespadeployment", - "GetDeploymentSummariesResponseVespaDeploymentTypedDict": ".getdeploymentsummariesresponsevespadeployment", - "GetDeploymentSummariesResponseVespaIndex": ".getdeploymentsummariesresponsevespaindex", - "GetDeploymentSummariesResponseVespaIndexTypedDict": ".getdeploymentsummariesresponsevespaindex", "GetFileResponse": ".getfileresponse", "GetFileResponseTypedDict": ".getfileresponse", "GetLog": ".getlog", @@ -8574,8 +8554,6 @@ "ImportDatasetFromDatasetRequestTypedDict": ".importdatasetfromdatasetrequest", "ImportDatasetFromFileRequest": ".importdatasetfromfilerequest", "ImportDatasetFromFileRequestTypedDict": ".importdatasetfromfilerequest", - "ImportDatasetFromPlaygroundRequest": ".importdatasetfromplaygroundrequest", - "ImportDatasetFromPlaygroundRequestTypedDict": ".importdatasetfromplaygroundrequest", "ImportDatasetFromSpansRequest": ".importdatasetfromspansrequest", "ImportDatasetFromSpansRequestTypedDict": ".importdatasetfromspansrequest", "In": ".in_", @@ -8593,8 +8571,6 @@ "UnknownResult": ".ingestdocumentsresponse", "IngestionPipelineConfiguration": ".ingestionpipelineconfiguration", "IngestionPipelineConfigurationTypedDict": ".ingestionpipelineconfiguration", - "IngestionPipelineTargetIndexRef": ".ingestionpipelinetargetindexref", - "IngestionPipelineTargetIndexRefTypedDict": ".ingestionpipelinetargetindexref", "InputEntries": ".inputentries", "InputEntriesTypedDict": ".inputentries", "Inputs": ".inputs", @@ -8911,6 +8887,11 @@ "MetricAggregation": ".metricaggregation", "MetricDefinition": ".metricdefinition", "MetricDefinitionTypedDict": ".metricdefinition", + "MetricDirectionSpec": ".metricdirectionspec", + "MetricDirectionSpecDirection": ".metricdirectionspec", + "MetricDirectionSpecTypedDict": ".metricdirectionspec", + "MissingGoalItem": ".missinggoalitem", + "MissingGoalItemTypedDict": ".missinggoalitem", "MistralEmbeddingModel": ".mistralembeddingmodel", "MistralEmbeddingModelTypedDict": ".mistralembeddingmodel", "MistralPromptMode": ".mistralpromptmode", @@ -8939,6 +8920,10 @@ "ModerationLlmv2ConfigTypedDict": ".moderationllmv2config", "ModerationObject": ".moderationobject", "ModerationObjectTypedDict": ".moderationobject", + "ModerationRequest": ".moderationrequest", + "ModerationRequestInputs": ".moderationrequest", + "ModerationRequestInputsTypedDict": ".moderationrequest", + "ModerationRequestTypedDict": ".moderationrequest", "ModerationResponse": ".moderationresponse", "ModerationResponseTypedDict": ".moderationresponse", "NavigateIndexV1ContextSearchIndexesIndexNameNavigatePostRequest": ".navigate_index_v1_context_search_indexes_index_name_navigate_postop", @@ -8965,6 +8950,7 @@ "OAuth2AuthMethodTypedDict": ".oauth2authmethod", "OAuth2AuthorizationCodeAuthMethod": ".oauth2authorizationcodeauthmethod", "OAuth2AuthorizationCodeAuthMethodTypedDict": ".oauth2authorizationcodeauthmethod", + "TokenEndpointAuthMethod": ".oauth2authorizationcodeauthmethod", "OAuth2ClientCredentialsAuthMethod": ".oauth2clientcredentialsauthmethod", "OAuth2ClientCredentialsAuthMethodTypedDict": ".oauth2clientcredentialsauthmethod", "OAuth2ClientCredentialsInput": ".oauth2clientcredentialsinput", @@ -9134,8 +9120,6 @@ "PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIDImportsFromDatasetPostRequestTypedDict": ".post_dataset_records_from_dataset_v1_observability_datasets_dataset_id_imports_from_dataset_postop", "PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequest": ".post_dataset_records_from_file_v1_observability_datasets_dataset_id_imports_from_file_postop", "PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequestTypedDict": ".post_dataset_records_from_file_v1_observability_datasets_dataset_id_imports_from_file_postop", - "PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequest": ".post_dataset_records_from_playground_v1_observability_datasets_dataset_id_imports_from_playground_postop", - "PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequestTypedDict": ".post_dataset_records_from_playground_v1_observability_datasets_dataset_id_imports_from_playground_postop", "PostDatasetRecordsFromSpansV1ObservabilityDatasetsDatasetIDImportsFromSpansPostRequest": ".post_dataset_records_from_spans_v1_observability_datasets_dataset_id_imports_from_spans_postop", "PostDatasetRecordsFromSpansV1ObservabilityDatasetsDatasetIDImportsFromSpansPostRequestTypedDict": ".post_dataset_records_from_spans_v1_observability_datasets_dataset_id_imports_from_spans_postop", "Prediction": ".prediction", @@ -9184,6 +9168,8 @@ "UpdatePromptRequestTypedDict": ".prompts_updateop", "PromptsCapability": ".promptscapability", "PromptsCapabilityTypedDict": ".promptscapability", + "PromptTokensDetails": ".prompttokensdetails", + "PromptTokensDetailsTypedDict": ".prompttokensdetails", "PromptVariable": ".promptvariable", "PromptVariableTypedDict": ".promptvariable", "PromptVersion": ".promptversion", @@ -9268,19 +9254,6 @@ "ReferenceChunkTypedDict": ".referencechunk", "ReferenceID": ".referencechunk", "ReferenceIDTypedDict": ".referencechunk", - "RegisterDeploymentRequestDeployment": ".registerdeploymentrequestdeployment", - "RegisterDeploymentRequestDeploymentDeployment": ".registerdeploymentrequestdeployment", - "RegisterDeploymentRequestDeploymentDeploymentTypedDict": ".registerdeploymentrequestdeployment", - "RegisterDeploymentRequestDeploymentStatus": ".registerdeploymentrequestdeployment", - "RegisterDeploymentRequestDeploymentTypedDict": ".registerdeploymentrequestdeployment", - "RegisterDeploymentRequestVespaDeployment": ".registerdeploymentrequestvespadeployment", - "RegisterDeploymentRequestVespaDeploymentTypedDict": ".registerdeploymentrequestvespadeployment", - "RegisterDeploymentRequestVespaField": ".registerdeploymentrequestvespafield", - "RegisterDeploymentRequestVespaFieldTypedDict": ".registerdeploymentrequestvespafield", - "RegisterDeploymentRequestVespaIndex": ".registerdeploymentrequestvespaindex", - "RegisterDeploymentRequestVespaIndexTypedDict": ".registerdeploymentrequestvespaindex", - "RegisterSearchIndexResponseIndex": ".registersearchindexresponseindex", - "RegisterSearchIndexResponseIndexTypedDict": ".registersearchindexresponseindex", "RegistrySharingScope": ".registrysharingscope", "RejectedDocumentResponse": ".rejecteddocumentresponse", "RejectedDocumentResponseTypedDict": ".rejecteddocumentresponse", @@ -9551,16 +9524,16 @@ "ScheduleRangeTypedDict": ".schedulerange", "ScheduleRecentExecution": ".schedulerecentexecution", "ScheduleRecentExecutionTypedDict": ".schedulerecentexecution", - "SchemaFieldDataType": ".schemafielddatatype", - "SchemaFieldIndex": ".schemafieldindex", - "SchemaFieldRankingType": ".schemafieldrankingtype", - "SchemaFieldStorage": ".schemafieldstorage", "ScoreFilter": ".scorefilter", "ScoreFilterTypedDict": ".scorefilter", "ScoreFilterValue": ".scorefilter", "ScoreFilterValueTypedDict": ".scorefilter", "ScoreFilterGroup": ".scorefiltergroup", "ScoreFilterGroupTypedDict": ".scorefiltergroup", + "ScoreMetric": ".scoremetric", + "ScoreMetricTypedDict": ".scoremetric", + "ScoreMetricValue": ".scoremetric", + "ScoreMetricValueTypedDict": ".scoremetric", "ScoreOperator": ".scoreoperator", "Scorer": ".scorer", "ScorerTypedDict": ".scorer", @@ -9637,6 +9610,8 @@ "SignalDefinition": ".signaldefinition", "SignalDefinitionTypedDict": ".signaldefinition", "SignalInvocationBody": ".signalinvocationbody", + "SignalInvocationBodyCallContext": ".signalinvocationbody", + "SignalInvocationBodyCallContextTypedDict": ".signalinvocationbody", "SignalInvocationBodyInput": ".signalinvocationbody", "SignalInvocationBodyInputTypedDict": ".signalinvocationbody", "SignalInvocationBodyNetworkEncodedInput": ".signalinvocationbody", @@ -9996,8 +9971,6 @@ "UnarchiveModelResponseTypedDict": ".unarchivemodelresponse", "UnhardenDeploymentV1WorkflowsDeploymentsDeploymentIDUnhardenPostRequest": ".unharden_deployment_v1_workflows_deployments_deployment_id_unharden_postop", "UnhardenDeploymentV1WorkflowsDeploymentsDeploymentIDUnhardenPostRequestTypedDict": ".unharden_deployment_v1_workflows_deployments_deployment_id_unharden_postop", - "UnregisterDeploymentV1RagDeploymentsDeploymentIDDeleteRequest": ".unregister_deployment_v1_rag_deployments_deployment_id_deleteop", - "UnregisterDeploymentV1RagDeploymentsDeploymentIDDeleteRequestTypedDict": ".unregister_deployment_v1_rag_deployments_deployment_id_deleteop", "UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequest": ".unschedule_workflow_v1_workflows_schedules_schedule_id_deleteop", "UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequestTypedDict": ".unschedule_workflow_v1_workflows_schedules_schedule_id_deleteop", "UnsupportedStatistics": ".unsupportedstatistics", @@ -10012,10 +9985,6 @@ "UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequestTypedDict": ".update_dataset_v1_observability_datasets_dataset_id_patchop", "UpdateDeploymentV1WorkflowsDeploymentsNamePatchRequest": ".update_deployment_v1_workflows_deployments_name_patchop", "UpdateDeploymentV1WorkflowsDeploymentsNamePatchRequestTypedDict": ".update_deployment_v1_workflows_deployments_name_patchop", - "MetricsData": ".update_index_metrics_v1_rag_deployments_deployment_id_metrics_putop", - "MetricsDataTypedDict": ".update_index_metrics_v1_rag_deployments_deployment_id_metrics_putop", - "UpdateIndexMetricsV1RagDeploymentsDeploymentIDMetricsPutRequest": ".update_index_metrics_v1_rag_deployments_deployment_id_metrics_putop", - "UpdateIndexMetricsV1RagDeploymentsDeploymentIDMetricsPutRequestTypedDict": ".update_index_metrics_v1_rag_deployments_deployment_id_metrics_putop", "UpdateIndexV1ContextSearchIndexesIndexNamePutRequest": ".update_index_v1_context_search_indexes_index_name_putop", "UpdateIndexV1ContextSearchIndexesIndexNamePutRequestTypedDict": ".update_index_v1_context_search_indexes_index_name_putop", "UpdatePipelineV1ObservabilityPipelinesPipelineIDPutRequest": ".update_pipeline_v1_observability_pipelines_pipeline_id_putop", @@ -10059,6 +10028,8 @@ "UpdateHTTPConnectorRequestAuthMethod2TypedDict": ".updatehttpconnectorrequest", "UpdateHTTPConnectorRequestTypedDict": ".updatehttpconnectorrequest", "UpdateInvocationBody": ".updateinvocationbody", + "UpdateInvocationBodyCallContext": ".updateinvocationbody", + "UpdateInvocationBodyCallContextTypedDict": ".updateinvocationbody", "UpdateInvocationBodyInput": ".updateinvocationbody", "UpdateInvocationBodyInputTypedDict": ".updateinvocationbody", "UpdateInvocationBodyTypedDict": ".updateinvocationbody", @@ -10066,12 +10037,6 @@ "UpdateLibraryRequestTypedDict": ".updatelibraryrequest", "UpdateManagedIndexRequest": ".updatemanagedindexrequest", "UpdateManagedIndexRequestTypedDict": ".updatemanagedindexrequest", - "UpdateMetricsRequestDeploymentMetricsOffline": ".updatemetricsrequestdeploymentmetricsoffline", - "UpdateMetricsRequestDeploymentMetricsOfflineTypedDict": ".updatemetricsrequestdeploymentmetricsoffline", - "UpdateMetricsRequestDeploymentMetricsOnline": ".updatemetricsrequestdeploymentmetricsonline", - "UpdateMetricsRequestDeploymentMetricsOnlineTypedDict": ".updatemetricsrequestdeploymentmetricsonline", - "UpdateMetricsRequestIndexMetrics": ".updatemetricsrequestindexmetrics", - "UpdateMetricsRequestIndexMetricsTypedDict": ".updatemetricsrequestindexmetrics", "UpdateModelRequest": ".updatemodelrequest", "UpdateModelRequestTypedDict": ".updatemodelrequest", "UpdatePipelineRequest": ".updatepipelinerequest", @@ -10248,6 +10213,8 @@ "WorkflowExecutionProgressTraceEvent": ".workflowexecutionprogresstraceevent", "WorkflowExecutionProgressTraceEventTypedDict": ".workflowexecutionprogresstraceevent", "WorkflowExecutionRequest": ".workflowexecutionrequest", + "WorkflowExecutionRequestCallContext": ".workflowexecutionrequest", + "WorkflowExecutionRequestCallContextTypedDict": ".workflowexecutionrequest", "WorkflowExecutionRequestTypedDict": ".workflowexecutionrequest", "WorkflowExecutionResponse": ".workflowexecutionresponse", "WorkflowExecutionResponseTypedDict": ".workflowexecutionresponse", diff --git a/src/mistralai/client/models/agentscompletionrequest.py b/src/mistralai/client/models/agentscompletionrequest.py index 41b3d9536..40cb90819 100644 --- a/src/mistralai/client/models/agentscompletionrequest.py +++ b/src/mistralai/client/models/agentscompletionrequest.py @@ -109,7 +109,7 @@ class AgentsCompletionRequestTypedDict(TypedDict): r"""The seed to use for random sampling. If set, different calls will generate deterministic results.""" 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.""" + 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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt.""" tools: NotRequired[Nullable[List[AgentsCompletionRequestToolTypedDict]]] tool_choice: NotRequired[AgentsCompletionRequestToolChoiceTypedDict] presence_penalty: NotRequired[Nullable[float]] @@ -159,7 +159,7 @@ class AgentsCompletionRequest(BaseModel): metadata: OptionalNullable[Dict[str, Any]] = UNSET 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.""" + 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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt.""" tools: OptionalNullable[List[AgentsCompletionRequestTool]] = UNSET diff --git a/src/mistralai/client/models/agentscompletionstreamrequest.py b/src/mistralai/client/models/agentscompletionstreamrequest.py index ed37723ef..2bedb5c91 100644 --- a/src/mistralai/client/models/agentscompletionstreamrequest.py +++ b/src/mistralai/client/models/agentscompletionstreamrequest.py @@ -108,7 +108,7 @@ class AgentsCompletionStreamRequestTypedDict(TypedDict): r"""The seed to use for random sampling. If set, different calls will generate deterministic results.""" 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.""" + 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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt.""" tools: NotRequired[Nullable[List[AgentsCompletionStreamRequestToolTypedDict]]] tool_choice: NotRequired[AgentsCompletionStreamRequestToolChoiceTypedDict] presence_penalty: NotRequired[Nullable[float]] @@ -157,7 +157,7 @@ class AgentsCompletionStreamRequest(BaseModel): metadata: OptionalNullable[Dict[str, Any]] = UNSET 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.""" + 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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt.""" tools: OptionalNullable[List[AgentsCompletionStreamRequestTool]] = UNSET diff --git a/src/mistralai/client/models/audiochunk.py b/src/mistralai/client/models/audiochunk.py index 6d563417a..119cb62f9 100644 --- a/src/mistralai/client/models/audiochunk.py +++ b/src/mistralai/client/models/audiochunk.py @@ -1,11 +1,18 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from mistralai.client.types import BaseModel +from mistralai.client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from mistralai.client.types.basemodel import current_filtered_dump from mistralai.client.utils import validate_const import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from typing import Literal +from typing import Literal, Optional from typing_extensions import Annotated, TypedDict @@ -19,11 +26,35 @@ class AudioChunk(BaseModel): type: Annotated[ Annotated[ - Literal["input_audio"], AfterValidator(validate_const("input_audio")) + Optional[Literal["input_audio"]], + AfterValidator(validate_const("input_audio")), ], pydantic.Field(alias="type"), ] = "input_audio" + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["type"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + 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: AudioChunk.model_rebuild() diff --git a/src/mistralai/client/models/chatcompletionrequest.py b/src/mistralai/client/models/chatcompletionrequest.py index 95899c05a..7725fd8d7 100644 --- a/src/mistralai/client/models/chatcompletionrequest.py +++ b/src/mistralai/client/models/chatcompletionrequest.py @@ -115,7 +115,7 @@ class ChatCompletionRequestTypedDict(TypedDict): r"""The seed to use for random sampling. If set, different calls will generate deterministic results.""" 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.""" + 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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt.""" 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] @@ -176,7 +176,7 @@ class ChatCompletionRequest(BaseModel): metadata: OptionalNullable[Dict[str, Any]] = UNSET 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.""" + 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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt.""" 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.""" diff --git a/src/mistralai/client/models/chatcompletionstreamrequest.py b/src/mistralai/client/models/chatcompletionstreamrequest.py index e41f097a2..a935022d0 100644 --- a/src/mistralai/client/models/chatcompletionstreamrequest.py +++ b/src/mistralai/client/models/chatcompletionstreamrequest.py @@ -114,7 +114,7 @@ class ChatCompletionStreamRequestTypedDict(TypedDict): r"""The seed to use for random sampling. If set, different calls will generate deterministic results.""" 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.""" + 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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt.""" 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] @@ -174,7 +174,7 @@ class ChatCompletionStreamRequest(BaseModel): metadata: OptionalNullable[Dict[str, Any]] = UNSET 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.""" + 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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt.""" 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.""" diff --git a/src/mistralai/client/models/chatmoderationrequest.py b/src/mistralai/client/models/chatmoderationrequest.py index 664349ec3..cab572871 100644 --- a/src/mistralai/client/models/chatmoderationrequest.py +++ b/src/mistralai/client/models/chatmoderationrequest.py @@ -64,25 +64,25 @@ List[List[ChatModerationRequestInputs2TypedDict]], ], ) -r"""Chat to classify""" +r"""Chat to classify.""" ChatModerationRequestInputs3 = TypeAliasType( "ChatModerationRequestInputs3", Union[List[ChatModerationRequestInputs1], List[List[ChatModerationRequestInputs2]]], ) -r"""Chat to classify""" +r"""Chat to classify.""" class ChatModerationRequestTypedDict(TypedDict): inputs: ChatModerationRequestInputs3TypedDict - r"""Chat to classify""" + r"""Chat to classify.""" model: str class ChatModerationRequest(BaseModel): inputs: Annotated[ChatModerationRequestInputs3, pydantic.Field(alias="input")] - r"""Chat to classify""" + r"""Chat to classify.""" model: str diff --git a/src/mistralai/client/models/connectorerrorcode.py b/src/mistralai/client/models/connectorerrorcode.py index 327198099..67a85ba5e 100644 --- a/src/mistralai/client/models/connectorerrorcode.py +++ b/src/mistralai/client/models/connectorerrorcode.py @@ -10,6 +10,7 @@ "connectors_count_limit_reached", "credentials_rejected", "server_unreachable", + "custom_connectors_disabled", ], UnrecognizedStr, ] diff --git a/src/mistralai/client/models/post_dataset_records_from_playground_v1_observability_datasets_dataset_id_imports_from_playground_postop.py b/src/mistralai/client/models/create_dataset_records_v1_observability_datasets_dataset_id_records_bulk_postop.py similarity index 58% rename from src/mistralai/client/models/post_dataset_records_from_playground_v1_observability_datasets_dataset_id_imports_from_playground_postop.py rename to src/mistralai/client/models/create_dataset_records_v1_observability_datasets_dataset_id_records_bulk_postop.py index 0a58bbbf9..9faaedcb9 100644 --- a/src/mistralai/client/models/post_dataset_records_from_playground_v1_observability_datasets_dataset_id_imports_from_playground_postop.py +++ b/src/mistralai/client/models/create_dataset_records_v1_observability_datasets_dataset_id_records_bulk_postop.py @@ -1,24 +1,24 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .importdatasetfromplaygroundrequest import ( - ImportDatasetFromPlaygroundRequest, - ImportDatasetFromPlaygroundRequestTypedDict, +from .createdatasetrecordsrequest import ( + CreateDatasetRecordsRequest, + CreateDatasetRecordsRequestTypedDict, ) from mistralai.client.types import BaseModel from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata from typing_extensions import Annotated, TypedDict -class PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequestTypedDict( +class CreateDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsBulkPostRequestTypedDict( TypedDict ): dataset_id: str r"""Dataset UUID or workspace-scoped slug. UUID-shaped values are always interpreted as dataset IDs.""" - import_dataset_from_playground_request: ImportDatasetFromPlaygroundRequestTypedDict + create_dataset_records_request: CreateDatasetRecordsRequestTypedDict -class PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequest( +class CreateDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsBulkPostRequest( BaseModel ): dataset_id: Annotated[ @@ -26,7 +26,7 @@ class PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFro ] r"""Dataset UUID or workspace-scoped slug. UUID-shaped values are always interpreted as dataset IDs.""" - import_dataset_from_playground_request: Annotated[ - ImportDatasetFromPlaygroundRequest, + create_dataset_records_request: Annotated[ + CreateDatasetRecordsRequest, FieldMetadata(request=RequestMetadata(media_type="application/json")), ] diff --git a/src/mistralai/client/models/createdatasetrecordsitem.py b/src/mistralai/client/models/createdatasetrecordsitem.py new file mode 100644 index 000000000..6970d95ef --- /dev/null +++ b/src/mistralai/client/models/createdatasetrecordsitem.py @@ -0,0 +1,78 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from mistralai.client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import Any, Dict, Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +CreateDatasetRecordsItemSource = Literal[ + "DIRECT_INPUT", + "TELEMETRY_SPAN", +] +r"""Caller-declared channel that initiated record creation. This value does not certify that the payload is an unmodified copy of its source.""" + + +class CreateDatasetRecordsItemTypedDict(TypedDict): + payload: Dict[str, Any] + r"""Caller-authored input object stored on a dataset record.""" + properties: NotRequired[Dict[str, Any]] + source: NotRequired[CreateDatasetRecordsItemSource] + r"""Caller-declared channel that initiated record creation. This value does not certify that the payload is an unmodified copy of its source.""" + id: NotRequired[Nullable[str]] + r"""Optional client-generated record ID, to retry safely: a record with this ID that already exists in the dataset is returned as is instead of being created again.""" + + +class CreateDatasetRecordsItem(BaseModel): + payload: Dict[str, Any] + r"""Caller-authored input object stored on a dataset record.""" + + properties: Optional[Dict[str, Any]] = None + + source: Optional[CreateDatasetRecordsItemSource] = "DIRECT_INPUT" + r"""Caller-declared channel that initiated record creation. This value does not certify that the payload is an unmodified copy of its source.""" + + id: OptionalNullable[str] = UNSET + r"""Optional client-generated record ID, to retry safely: a record with this ID that already exists in the dataset is returned as is instead of being created again.""" + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["properties", "source", "id"]) + nullable_fields = set(["id"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/createdatasetrecordsrequest.py b/src/mistralai/client/models/createdatasetrecordsrequest.py new file mode 100644 index 000000000..bd9139051 --- /dev/null +++ b/src/mistralai/client/models/createdatasetrecordsrequest.py @@ -0,0 +1,20 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .createdatasetrecordsitem import ( + CreateDatasetRecordsItem, + CreateDatasetRecordsItemTypedDict, +) +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class CreateDatasetRecordsRequestTypedDict(TypedDict): + records: List[CreateDatasetRecordsItemTypedDict] + r"""Records to add. They are created together: if one is invalid, none is created.""" + + +class CreateDatasetRecordsRequest(BaseModel): + records: List[CreateDatasetRecordsItem] + r"""Records to add. They are created together: if one is invalid, none is created.""" diff --git a/src/mistralai/client/models/createdatasetrecordsresponse.py b/src/mistralai/client/models/createdatasetrecordsresponse.py new file mode 100644 index 000000000..aa7e47937 --- /dev/null +++ b/src/mistralai/client/models/createdatasetrecordsresponse.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .datasetrecord import DatasetRecord, DatasetRecordTypedDict +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class CreateDatasetRecordsResponseTypedDict(TypedDict): + records: List[DatasetRecordTypedDict] + r"""The created records, in the request order.""" + + +class CreateDatasetRecordsResponse(BaseModel): + records: List[DatasetRecord] + r"""The created records, in the request order.""" diff --git a/src/mistralai/client/models/createdatasetrequest.py b/src/mistralai/client/models/createdatasetrequest.py index 0f2991f3a..4211aba52 100644 --- a/src/mistralai/client/models/createdatasetrequest.py +++ b/src/mistralai/client/models/createdatasetrequest.py @@ -1,16 +1,50 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from mistralai.client.types import BaseModel -from typing_extensions import TypedDict +from mistralai.client.types import ( + BaseModel, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from mistralai.client.types.basemodel import current_filtered_dump +from pydantic import model_serializer +from typing import Any, Dict, Optional +from typing_extensions import NotRequired, TypedDict class CreateDatasetRequestTypedDict(TypedDict): name: str description: str + metadata: NotRequired[Dict[str, Any]] class CreateDatasetRequest(BaseModel): name: str description: str + + metadata: Optional[Dict[str, Any]] = None + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["metadata"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + 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/createdeploymentarchiverequest.py b/src/mistralai/client/models/createdeploymentarchiverequest.py new file mode 100644 index 000000000..a4023eb8a --- /dev/null +++ b/src/mistralai/client/models/createdeploymentarchiverequest.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class CreateDeploymentArchiveRequestTypedDict(TypedDict): + r"""The size of the gzipped tar a managed deployment will build from.""" + + size: int + r"""Size of the gzipped tar in bytes, at most 256 MiB. The upload URL accepts exactly this size.""" + + +class CreateDeploymentArchiveRequest(BaseModel): + r"""The size of the gzipped tar a managed deployment will build from.""" + + size: int + r"""Size of the gzipped tar in bytes, at most 256 MiB. The upload URL accepts exactly this size.""" diff --git a/src/mistralai/client/models/createingestionpipelineconfigurationrequest.py b/src/mistralai/client/models/createingestionpipelineconfigurationrequest.py index 10fe64193..b0a7d5ee8 100644 --- a/src/mistralai/client/models/createingestionpipelineconfigurationrequest.py +++ b/src/mistralai/client/models/createingestionpipelineconfigurationrequest.py @@ -1,10 +1,6 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .ingestionpipelinetargetindexref import ( - IngestionPipelineTargetIndexRef, - IngestionPipelineTargetIndexRefTypedDict, -) from mistralai.client.types import ( BaseModel, Nullable, @@ -16,16 +12,13 @@ ) from mistralai.client.types.basemodel import current_filtered_dump from pydantic import model_serializer -from typing import Dict, List +from typing import Dict from typing_extensions import NotRequired, TypedDict class CreateIngestionPipelineConfigurationRequestTypedDict(TypedDict): name: str pipeline_composition: NotRequired[Nullable[Dict[str, str]]] - target_indexes: NotRequired[ - Nullable[List[IngestionPipelineTargetIndexRefTypedDict]] - ] class CreateIngestionPipelineConfigurationRequest(BaseModel): @@ -33,15 +26,13 @@ class CreateIngestionPipelineConfigurationRequest(BaseModel): pipeline_composition: OptionalNullable[Dict[str, str]] = UNSET - target_indexes: OptionalNullable[List[IngestionPipelineTargetIndexRef]] = UNSET - @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) def serialize_model(self, handler): - optional_fields = set(["pipeline_composition", "target_indexes"]) - nullable_fields = set(["pipeline_composition", "target_indexes"]) + optional_fields = set(["pipeline_composition"]) + nullable_fields = set(["pipeline_composition"]) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() serialized = handler(self) diff --git a/src/mistralai/client/models/createwebhook.py b/src/mistralai/client/models/createwebhook.py index 68cdec5a9..6260e40a4 100644 --- a/src/mistralai/client/models/createwebhook.py +++ b/src/mistralai/client/models/createwebhook.py @@ -26,6 +26,8 @@ class CreateWebhookTypedDict(TypedDict): name: str r"""Human-readable name for this webhook""" owner_type: NotRequired[TriggersOwnerType] + description: NotRequired[Nullable[str]] + r"""What this webhook is used for""" secret: NotRequired[Nullable[str]] r"""Signing secret provided by the third-party provider""" encryption_key: NotRequired[Nullable[str]] @@ -40,11 +42,14 @@ class CreateWebhookTypedDict(TypedDict): signature_extractor_regex: NotRequired[Nullable[str]] r"""Regex to extract signature, eg sha256=(.*)""" timestamp_extractor_regex: NotRequired[Nullable[str]] - r"""Regex to extract the timestamp from the signature header, used as {timestamp}, eg t=([^,]+)""" + r"""Regex to extract the timestamp from the rendered timestamp_pattern (the signature header by default), used as {timestamp}, eg t=([^,]+). Defaults to the whole value when timestamp_pattern is set""" + timestamp_pattern: NotRequired[Nullable[str]] + r"""Pattern for the timestamp used as {timestamp}, with {body.} and {headers.} placeholders, eg {headers.X-Slack-Request-Timestamp} or {body.webhookTimestamp}. Defaults to the signature header when timestamp_extractor_regex is set""" signature_payload_pattern: NotRequired[Nullable[str]] r"""Pattern for signature payload, eg {body} or {timestamp}.{body}""" signature_encoding: NotRequired[Nullable[WebhookSignatureEncoding]] success_status_code: NotRequired[Nullable[int]] + r"""HTTP status code returned for accepted deliveries, eg 200""" event_type_pattern: NotRequired[Nullable[str]] r"""Pattern for the event type, with {body.} and {headers.} placeholders, eg {body.type} or {headers.X-GitHub-Event}""" event_id_pattern: NotRequired[Nullable[str]] @@ -59,6 +64,9 @@ class CreateWebhook(BaseModel): owner_type: Optional[TriggersOwnerType] = None + description: OptionalNullable[str] = UNSET + r"""What this webhook is used for""" + secret: OptionalNullable[str] = UNSET r"""Signing secret provided by the third-party provider""" @@ -81,7 +89,10 @@ class CreateWebhook(BaseModel): r"""Regex to extract signature, eg sha256=(.*)""" timestamp_extractor_regex: OptionalNullable[str] = UNSET - r"""Regex to extract the timestamp from the signature header, used as {timestamp}, eg t=([^,]+)""" + r"""Regex to extract the timestamp from the rendered timestamp_pattern (the signature header by default), used as {timestamp}, eg t=([^,]+). Defaults to the whole value when timestamp_pattern is set""" + + timestamp_pattern: OptionalNullable[str] = UNSET + r"""Pattern for the timestamp used as {timestamp}, with {body.} and {headers.} placeholders, eg {headers.X-Slack-Request-Timestamp} or {body.webhookTimestamp}. Defaults to the signature header when timestamp_extractor_regex is set""" signature_payload_pattern: OptionalNullable[str] = UNSET r"""Pattern for signature payload, eg {body} or {timestamp}.{body}""" @@ -89,6 +100,7 @@ class CreateWebhook(BaseModel): signature_encoding: OptionalNullable[WebhookSignatureEncoding] = UNSET success_status_code: OptionalNullable[int] = UNSET + r"""HTTP status code returned for accepted deliveries, eg 200""" event_type_pattern: OptionalNullable[str] = UNSET r"""Pattern for the event type, with {body.} and {headers.} placeholders, eg {body.type} or {headers.X-GitHub-Event}""" @@ -104,6 +116,7 @@ def serialize_model(self, handler): optional_fields = set( [ "owner_type", + "description", "secret", "encryption_key", "url_verification_token", @@ -113,6 +126,7 @@ def serialize_model(self, handler): "validity_period_second", "signature_extractor_regex", "timestamp_extractor_regex", + "timestamp_pattern", "signature_payload_pattern", "signature_encoding", "success_status_code", @@ -122,6 +136,7 @@ def serialize_model(self, handler): ) nullable_fields = set( [ + "description", "secret", "encryption_key", "url_verification_token", @@ -131,6 +146,7 @@ def serialize_model(self, handler): "validity_period_second", "signature_extractor_regex", "timestamp_extractor_regex", + "timestamp_pattern", "signature_payload_pattern", "signature_encoding", "success_status_code", diff --git a/src/mistralai/client/models/dataset.py b/src/mistralai/client/models/dataset.py index 6350b9410..a9e148346 100644 --- a/src/mistralai/client/models/dataset.py +++ b/src/mistralai/client/models/dataset.py @@ -12,7 +12,7 @@ ) from mistralai.client.types.basemodel import current_filtered_dump from pydantic import model_serializer -from typing import Optional +from typing import Any, Dict, Optional from typing_extensions import NotRequired, TypedDict @@ -27,6 +27,7 @@ class DatasetTypedDict(TypedDict): owner_id: str workspace_id: str owner_type: NotRequired[PrincipalType] + metadata: NotRequired[Dict[str, Any]] class Dataset(BaseModel): @@ -50,12 +51,14 @@ class Dataset(BaseModel): owner_type: Optional[PrincipalType] = None + metadata: Optional[Dict[str, Any]] = None + @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) def serialize_model(self, handler): - optional_fields = set(["owner_type"]) + optional_fields = set(["owner_type", "metadata"]) nullable_fields = set(["deleted_at"]) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() diff --git a/src/mistralai/client/models/datasetpreview.py b/src/mistralai/client/models/datasetpreview.py index 072906c8a..dbed3b697 100644 --- a/src/mistralai/client/models/datasetpreview.py +++ b/src/mistralai/client/models/datasetpreview.py @@ -12,7 +12,7 @@ ) from mistralai.client.types.basemodel import current_filtered_dump from pydantic import model_serializer -from typing import Optional +from typing import Any, Dict, Optional from typing_extensions import NotRequired, TypedDict @@ -27,6 +27,7 @@ class DatasetPreviewTypedDict(TypedDict): owner_id: str workspace_id: str owner_type: NotRequired[PrincipalType] + metadata: NotRequired[Dict[str, Any]] class DatasetPreview(BaseModel): @@ -50,12 +51,14 @@ class DatasetPreview(BaseModel): owner_type: Optional[PrincipalType] = None + metadata: Optional[Dict[str, Any]] = None + @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) def serialize_model(self, handler): - optional_fields = set(["owner_type"]) + optional_fields = set(["owner_type", "metadata"]) nullable_fields = set(["deleted_at"]) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() diff --git a/src/mistralai/client/models/deploymentarchiveuploadresponse.py b/src/mistralai/client/models/deploymentarchiveuploadresponse.py new file mode 100644 index 000000000..666a06f32 --- /dev/null +++ b/src/mistralai/client/models/deploymentarchiveuploadresponse.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import Dict +from typing_extensions import TypedDict + + +class DeploymentArchiveUploadResponseTypedDict(TypedDict): + r"""An empty archive, and where to upload the tarball a managed deployment then builds from.""" + + archive_id: str + r"""Pass it as the spec's `archive_id` once the upload has finished.""" + upload_url: str + r"""A signed URL to PUT the tarball to. It grants write access, so keep it secret.""" + upload_headers: Dict[str, str] + r"""Headers the PUT must send for the signed URL to accept it.""" + + +class DeploymentArchiveUploadResponse(BaseModel): + r"""An empty archive, and where to upload the tarball a managed deployment then builds from.""" + + archive_id: str + r"""Pass it as the spec's `archive_id` once the upload has finished.""" + + upload_url: str + r"""A signed URL to PUT the tarball to. It grants write access, so keep it secret.""" + + upload_headers: Dict[str, str] + r"""Headers the PUT must send for the signed URL to accept it.""" diff --git a/src/mistralai/client/models/displayformat.py b/src/mistralai/client/models/displayformat.py new file mode 100644 index 000000000..95e81795a --- /dev/null +++ b/src/mistralai/client/models/displayformat.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +DisplayFormat = Union[ + Literal[ + "number", + "percent", + "integer", + ], + UnrecognizedStr, +] +r"""How an evaluator's numeric values render: ``percent``, ``integer`` or ``number``.""" diff --git a/src/mistralai/client/models/displayspec.py b/src/mistralai/client/models/displayspec.py new file mode 100644 index 000000000..8831d7ce6 --- /dev/null +++ b/src/mistralai/client/models/displayspec.py @@ -0,0 +1,96 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .displayformat import DisplayFormat +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from mistralai.client.types.basemodel import current_filtered_dump +import pydantic +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DisplaySpecTypedDict(TypedDict): + r"""How the UI renders an evaluator's numeric values (scores, score-scale statistics, goal thresholds). + + Display only: stored values and computed statistics never change. ``percent`` reads the value as a + fraction (0.63 renders as 63%), ``integer`` rounds it, ``number`` renders ``decimals`` decimals. + ``unit`` is a free suffix (\"s\", \"ms\", \"chars\"), not allowed with ``percent`` (its ``%`` is the unit). + All fields unset = the default rendering. + + ``metric`` (run evaluators only) names the run evaluator metric this format applies to. Without it, the + spec formats the main value and is the default format of every metric. + """ + + format_: NotRequired[Nullable[DisplayFormat]] + unit: NotRequired[Nullable[str]] + decimals: NotRequired[Nullable[int]] + metric: NotRequired[Nullable[str]] + + +class DisplaySpec(BaseModel): + r"""How the UI renders an evaluator's numeric values (scores, score-scale statistics, goal thresholds). + + Display only: stored values and computed statistics never change. ``percent`` reads the value as a + fraction (0.63 renders as 63%), ``integer`` rounds it, ``number`` renders ``decimals`` decimals. + ``unit`` is a free suffix (\"s\", \"ms\", \"chars\"), not allowed with ``percent`` (its ``%`` is the unit). + All fields unset = the default rendering. + + ``metric`` (run evaluators only) names the run evaluator metric this format applies to. Without it, the + spec formats the main value and is the default format of every metric. + """ + + format_: Annotated[ + OptionalNullable[DisplayFormat], pydantic.Field(alias="format") + ] = UNSET + + unit: OptionalNullable[str] = UNSET + + decimals: OptionalNullable[int] = UNSET + + metric: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["format", "unit", "decimals", "metric"]) + nullable_fields = set(["format", "unit", "decimals", "metric"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + DisplaySpec.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/embeddinginput.py b/src/mistralai/client/models/embeddinginput.py new file mode 100644 index 000000000..c3195de9d --- /dev/null +++ b/src/mistralai/client/models/embeddinginput.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .audiochunk import AudioChunk, AudioChunkTypedDict +from .imageurlchunk import ImageURLChunk, ImageURLChunkTypedDict +from typing import Union +from typing_extensions import TypeAliasType + + +EmbeddingInputTypedDict = TypeAliasType( + "EmbeddingInputTypedDict", Union[ImageURLChunkTypedDict, AudioChunkTypedDict, str] +) + + +EmbeddingInput = TypeAliasType("EmbeddingInput", Union[ImageURLChunk, AudioChunk, str]) diff --git a/src/mistralai/client/models/embeddingrequest.py b/src/mistralai/client/models/embeddingrequest.py index 3568542b7..8c05efa5c 100644 --- a/src/mistralai/client/models/embeddingrequest.py +++ b/src/mistralai/client/models/embeddingrequest.py @@ -1,8 +1,11 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .audiochunk import AudioChunk, AudioChunkTypedDict from .embeddingdtype import EmbeddingDtype +from .embeddinginput import EmbeddingInput, EmbeddingInputTypedDict from .encodingformat import EncodingFormat +from .imageurlchunk import ImageURLChunk, ImageURLChunkTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -20,12 +23,22 @@ EmbeddingRequestInputsTypedDict = TypeAliasType( - "EmbeddingRequestInputsTypedDict", Union[str, List[str]] + "EmbeddingRequestInputsTypedDict", + Union[ + ImageURLChunkTypedDict, + AudioChunkTypedDict, + str, + List[str], + List[EmbeddingInputTypedDict], + ], ) r"""Text to embed.""" -EmbeddingRequestInputs = TypeAliasType("EmbeddingRequestInputs", Union[str, List[str]]) +EmbeddingRequestInputs = TypeAliasType( + "EmbeddingRequestInputs", + Union[ImageURLChunk, AudioChunk, str, List[str], List[EmbeddingInput]], +) r"""Text to embed.""" diff --git a/src/mistralai/client/models/evaluationrunrunscorev2.py b/src/mistralai/client/models/evaluationrunrunscorev2.py new file mode 100644 index 000000000..2828a59c9 --- /dev/null +++ b/src/mistralai/client/models/evaluationrunrunscorev2.py @@ -0,0 +1,96 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .scoremetric import ScoreMetric, ScoreMetricTypedDict +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from mistralai.client.types.basemodel import current_filtered_dump +import pydantic +from pydantic import model_serializer +from typing import Any, Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class EvaluationRunRunScoreV2TypedDict(TypedDict): + r"""A run evaluator's score: a per-record score plus its metrics.""" + + id: str + created_at: datetime + updated_at: datetime + deleted_at: Nullable[datetime] + value: Nullable[Any] + metadata: Dict[str, Any] + status: str + rationale: NotRequired[Nullable[str]] + error: NotRequired[Nullable[str]] + metrics: NotRequired[List[ScoreMetricTypedDict]] + + +class EvaluationRunRunScoreV2(BaseModel): + r"""A run evaluator's score: a per-record score plus its metrics.""" + + id: str + + created_at: datetime + + updated_at: datetime + + deleted_at: Nullable[datetime] + + value: Nullable[Any] + + metadata: Annotated[Dict[str, Any], pydantic.Field(alias="metadata_")] + + status: str + + rationale: OptionalNullable[str] = UNSET + + error: OptionalNullable[str] = UNSET + + metrics: Optional[List[ScoreMetric]] = None + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["rationale", "error", "metrics"]) + nullable_fields = set(["deleted_at", "value", "rationale", "error"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + EvaluationRunRunScoreV2.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/evaluationrunv2response.py b/src/mistralai/client/models/evaluationrunv2response.py index 5fb958d69..46c0ecafc 100644 --- a/src/mistralai/client/models/evaluationrunv2response.py +++ b/src/mistralai/client/models/evaluationrunv2response.py @@ -1,7 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .evaluationrunscorev2 import EvaluationRunScoreV2, EvaluationRunScoreV2TypedDict +from .evaluationrunrunscorev2 import ( + EvaluationRunRunScoreV2, + EvaluationRunRunScoreV2TypedDict, +) from .evaluatorstatistics import EvaluatorStatistics, EvaluatorStatisticsTypedDict from .evaluatorv2 import EvaluatorV2, EvaluatorV2TypedDict from .goalresult import GoalResult, GoalResultTypedDict @@ -51,7 +54,7 @@ class EvaluationRunV2ResponseTypedDict(TypedDict): statistics: NotRequired[Dict[str, EvaluatorStatisticsTypedDict]] goal_results: NotRequired[Dict[str, GoalResultTypedDict]] passed: NotRequired[Nullable[bool]] - run_scores: NotRequired[Dict[str, EvaluationRunScoreV2TypedDict]] + run_scores: NotRequired[Dict[str, EvaluationRunRunScoreV2TypedDict]] optimization: NotRequired[Nullable[RunOptimizationRefTypedDict]] @@ -104,7 +107,7 @@ class EvaluationRunV2Response(BaseModel): passed: OptionalNullable[bool] = UNSET - run_scores: Optional[Dict[str, EvaluationRunScoreV2]] = None + run_scores: Optional[Dict[str, EvaluationRunRunScoreV2]] = None optimization: OptionalNullable[RunOptimizationRef] = UNSET diff --git a/src/mistralai/client/models/evaluationrunv2withrefsresponse.py b/src/mistralai/client/models/evaluationrunv2withrefsresponse.py index 99e9fe212..096b337d9 100644 --- a/src/mistralai/client/models/evaluationrunv2withrefsresponse.py +++ b/src/mistralai/client/models/evaluationrunv2withrefsresponse.py @@ -1,7 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .evaluationrunscorev2 import EvaluationRunScoreV2, EvaluationRunScoreV2TypedDict +from .evaluationrunrunscorev2 import ( + EvaluationRunRunScoreV2, + EvaluationRunRunScoreV2TypedDict, +) from .evaluatorstatistics import EvaluatorStatistics, EvaluatorStatisticsTypedDict from .evaluatorv2 import EvaluatorV2, EvaluatorV2TypedDict from .goalresult import GoalResult, GoalResultTypedDict @@ -53,7 +56,7 @@ class EvaluationRunV2WithRefsResponseTypedDict(TypedDict): statistics: NotRequired[Dict[str, EvaluatorStatisticsTypedDict]] goal_results: NotRequired[Dict[str, GoalResultTypedDict]] passed: NotRequired[Nullable[bool]] - run_scores: NotRequired[Dict[str, EvaluationRunScoreV2TypedDict]] + run_scores: NotRequired[Dict[str, EvaluationRunRunScoreV2TypedDict]] optimization: NotRequired[Nullable[RunOptimizationRefTypedDict]] evaluation: NotRequired[Nullable[RunEvaluationSummaryTypedDict]] project: NotRequired[Nullable[RunProjectSummaryTypedDict]] @@ -108,7 +111,7 @@ class EvaluationRunV2WithRefsResponse(BaseModel): passed: OptionalNullable[bool] = UNSET - run_scores: Optional[Dict[str, EvaluationRunScoreV2]] = None + run_scores: Optional[Dict[str, EvaluationRunRunScoreV2]] = None optimization: OptionalNullable[RunOptimizationRef] = UNSET diff --git a/src/mistralai/client/models/evaluatorv2.py b/src/mistralai/client/models/evaluatorv2.py index c0eb73e29..39b9532b8 100644 --- a/src/mistralai/client/models/evaluatorv2.py +++ b/src/mistralai/client/models/evaluatorv2.py @@ -5,7 +5,9 @@ ClassificationStatisticSpec, ClassificationStatisticSpecTypedDict, ) +from .displayspec import DisplaySpec, DisplaySpecTypedDict from .goalspec import GoalSpec, GoalSpecTypedDict +from .metricdirectionspec import MetricDirectionSpec, MetricDirectionSpecTypedDict from .percentilestatisticspec import ( PercentileStatisticSpec, PercentileStatisticSpecTypedDict, @@ -119,6 +121,9 @@ class EvaluatorV2TypedDict(TypedDict): direction: NotRequired[Nullable[EvaluatorV2Direction]] min_value: NotRequired[Nullable[float]] max_value: NotRequired[Nullable[float]] + display: NotRequired[Nullable[List[DisplaySpecTypedDict]]] + goals: NotRequired[Nullable[List[GoalSpecTypedDict]]] + metric_directions: NotRequired[Nullable[List[MetricDirectionSpecTypedDict]]] class EvaluatorV2(BaseModel): @@ -152,6 +157,12 @@ class EvaluatorV2(BaseModel): max_value: OptionalNullable[float] = UNSET + display: OptionalNullable[List[DisplaySpec]] = UNSET + + goals: OptionalNullable[List[GoalSpec]] = UNSET + + metric_directions: OptionalNullable[List[MetricDirectionSpec]] = UNSET + @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) @@ -166,6 +177,9 @@ def serialize_model(self, handler): "direction", "min_value", "max_value", + "display", + "goals", + "metric_directions", ] ) nullable_fields = set( @@ -178,6 +192,9 @@ def serialize_model(self, handler): "direction", "min_value", "max_value", + "display", + "goals", + "metric_directions", ] ) exclude_none = current_exclude_none() diff --git a/src/mistralai/client/models/getdeploymentsummariesresponse.py b/src/mistralai/client/models/getdeploymentsummariesresponse.py deleted file mode 100644 index 579d926e6..000000000 --- a/src/mistralai/client/models/getdeploymentsummariesresponse.py +++ /dev/null @@ -1,18 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .getdeploymentsummariesresponsedeployment import ( - GetDeploymentSummariesResponseDeployment, - GetDeploymentSummariesResponseDeploymentTypedDict, -) -from mistralai.client.types import BaseModel -from typing import List -from typing_extensions import TypedDict - - -class GetDeploymentSummariesResponseTypedDict(TypedDict): - deployments: List[GetDeploymentSummariesResponseDeploymentTypedDict] - - -class GetDeploymentSummariesResponse(BaseModel): - deployments: List[GetDeploymentSummariesResponseDeployment] diff --git a/src/mistralai/client/models/getdeploymentsummariesresponsedeployment.py b/src/mistralai/client/models/getdeploymentsummariesresponsedeployment.py deleted file mode 100644 index a45d7042b..000000000 --- a/src/mistralai/client/models/getdeploymentsummariesresponsedeployment.py +++ /dev/null @@ -1,75 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .getdeploymentsummariesresponsevespadeployment import ( - GetDeploymentSummariesResponseVespaDeployment, - GetDeploymentSummariesResponseVespaDeploymentTypedDict, -) -from datetime import datetime -from mistralai.client.types import BaseModel, UnrecognizedStr -from pydantic import ConfigDict -from typing import Any, Literal, Union -from typing_extensions import TypedDict - - -GetDeploymentSummariesResponseDeploymentStatus = Union[ - Literal[ - "online", - "offline", - ], - UnrecognizedStr, -] - - -GetDeploymentSummariesResponseDeploymentDeploymentTypedDict = ( - GetDeploymentSummariesResponseVespaDeploymentTypedDict -) - - -class UnknownGetDeploymentSummariesResponseDeploymentDeployment(BaseModel): - r"""A GetDeploymentSummariesResponseDeploymentDeployment variant the SDK doesn't recognize. Preserves the raw payload.""" - - type: Literal["UNKNOWN"] = "UNKNOWN" - raw: Any - is_unknown: Literal[True] = True - - model_config = ConfigDict(frozen=True) - - -_GET_DEPLOYMENT_SUMMARIES_RESPONSE_DEPLOYMENT_DEPLOYMENT_VARIANTS: dict[str, Any] = { - "vespa": GetDeploymentSummariesResponseVespaDeployment, -} - - -GetDeploymentSummariesResponseDeploymentDeployment = ( - GetDeploymentSummariesResponseVespaDeployment -) - - -class GetDeploymentSummariesResponseDeploymentTypedDict(TypedDict): - id: str - name: str - creator_id: str - document_count: int - status: GetDeploymentSummariesResponseDeploymentStatus - created_at: datetime - modified_at: datetime - deployment: GetDeploymentSummariesResponseDeploymentDeploymentTypedDict - - -class GetDeploymentSummariesResponseDeployment(BaseModel): - id: str - - name: str - - creator_id: str - - document_count: int - - status: GetDeploymentSummariesResponseDeploymentStatus - - created_at: datetime - - modified_at: datetime - - deployment: GetDeploymentSummariesResponseDeploymentDeployment diff --git a/src/mistralai/client/models/getdeploymentsummariesresponsevespadeployment.py b/src/mistralai/client/models/getdeploymentsummariesresponsevespadeployment.py deleted file mode 100644 index dbd93c0cd..000000000 --- a/src/mistralai/client/models/getdeploymentsummariesresponsevespadeployment.py +++ /dev/null @@ -1,33 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .getdeploymentsummariesresponsevespaindex import ( - GetDeploymentSummariesResponseVespaIndex, - GetDeploymentSummariesResponseVespaIndexTypedDict, -) -from mistralai.client.types import BaseModel -from mistralai.client.utils import validate_const -import pydantic -from pydantic.functional_validators import AfterValidator -from typing import List, Literal -from typing_extensions import Annotated, TypedDict - - -class GetDeploymentSummariesResponseVespaDeploymentTypedDict(TypedDict): - indexes: List[GetDeploymentSummariesResponseVespaIndexTypedDict] - type: Literal["vespa"] - - -class GetDeploymentSummariesResponseVespaDeployment(BaseModel): - indexes: List[GetDeploymentSummariesResponseVespaIndex] - - type: Annotated[ - Annotated[Literal["vespa"], AfterValidator(validate_const("vespa"))], - pydantic.Field(alias="type"), - ] = "vespa" - - -try: - GetDeploymentSummariesResponseVespaDeployment.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/goalresult.py b/src/mistralai/client/models/goalresult.py index 425ba55bb..ac342be44 100644 --- a/src/mistralai/client/models/goalresult.py +++ b/src/mistralai/client/models/goalresult.py @@ -2,6 +2,7 @@ from __future__ import annotations from .goalresultitem import GoalResultItem, GoalResultItemTypedDict +from .missinggoalitem import MissingGoalItem, MissingGoalItemTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -11,13 +12,14 @@ ) from mistralai.client.types.basemodel import current_filtered_dump from pydantic import model_serializer -from typing import List -from typing_extensions import TypedDict +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict class GoalResultTypedDict(TypedDict): passed: Nullable[bool] results: List[GoalResultItemTypedDict] + missing: NotRequired[List[MissingGoalItemTypedDict]] class GoalResult(BaseModel): @@ -25,11 +27,15 @@ class GoalResult(BaseModel): results: List[GoalResultItem] + missing: Optional[List[MissingGoalItem]] = None + @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) def serialize_model(self, handler): + optional_fields = set(["missing"]) + nullable_fields = set(["passed"]) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() serialized = handler(self) @@ -40,8 +46,17 @@ def serialize_model(self, handler): if k not in serialized and n not in serialized and skip_filtered: continue val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) if val != UNSET_SENTINEL: - m[k] = val + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m diff --git a/src/mistralai/client/models/importdatasetfromplaygroundrequest.py b/src/mistralai/client/models/importdatasetfromplaygroundrequest.py deleted file mode 100644 index f83fcd70c..000000000 --- a/src/mistralai/client/models/importdatasetfromplaygroundrequest.py +++ /dev/null @@ -1,14 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from mistralai.client.types import BaseModel -from typing import List -from typing_extensions import TypedDict - - -class ImportDatasetFromPlaygroundRequestTypedDict(TypedDict): - conversation_ids: List[str] - - -class ImportDatasetFromPlaygroundRequest(BaseModel): - conversation_ids: List[str] diff --git a/src/mistralai/client/models/ingestionpipelinetargetindexref.py b/src/mistralai/client/models/ingestionpipelinetargetindexref.py deleted file mode 100644 index 77bfc797a..000000000 --- a/src/mistralai/client/models/ingestionpipelinetargetindexref.py +++ /dev/null @@ -1,59 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from mistralai.client.types import ( - BaseModel, - UNSET_SENTINEL, - current_exclude_none, - serialize_with_info, -) -from mistralai.client.types.basemodel import current_filtered_dump -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional -from typing_extensions import Annotated, TypedDict - - -class IngestionPipelineTargetIndexRefTypedDict(TypedDict): - name: str - type: Literal["vespa"] - - -class IngestionPipelineTargetIndexRef(BaseModel): - name: str - - type: Annotated[ - Annotated[Optional[Literal["vespa"]], AfterValidator(validate_const("vespa"))], - pydantic.Field(alias="type"), - ] = "vespa" - - @model_serializer(mode="wrap") - def _serialize_model_with_info(self, handler, info): - return serialize_with_info(self.serialize_model, handler, info) - - def serialize_model(self, handler): - optional_fields = set(["type"]) - exclude_none = current_exclude_none() - skip_filtered = exclude_none is False or current_filtered_dump() - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias if f.alias is not None else n - if k not in serialized and n not in serialized and skip_filtered: - continue - 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: - IngestionPipelineTargetIndexRef.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/metricdirectionspec.py b/src/mistralai/client/models/metricdirectionspec.py new file mode 100644 index 000000000..552415fcc --- /dev/null +++ b/src/mistralai/client/models/metricdirectionspec.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import BaseModel, UnrecognizedStr +from typing import Literal, Union +from typing_extensions import TypedDict + + +MetricDirectionSpecDirection = Union[ + Literal[ + "maximize", + "minimize", + ], + UnrecognizedStr, +] + + +class MetricDirectionSpecTypedDict(TypedDict): + r"""Which way a run evaluator metric improves. The main value's direction stays the evaluator's ``direction``.""" + + metric: str + direction: MetricDirectionSpecDirection + + +class MetricDirectionSpec(BaseModel): + r"""Which way a run evaluator metric improves. The main value's direction stays the evaluator's ``direction``.""" + + metric: str + + direction: MetricDirectionSpecDirection diff --git a/src/mistralai/client/models/registerdeploymentrequestvespaindex.py b/src/mistralai/client/models/missinggoalitem.py similarity index 60% rename from src/mistralai/client/models/registerdeploymentrequestvespaindex.py rename to src/mistralai/client/models/missinggoalitem.py index db291b85f..d729869a1 100644 --- a/src/mistralai/client/models/registerdeploymentrequestvespaindex.py +++ b/src/mistralai/client/models/missinggoalitem.py @@ -1,10 +1,6 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .registerdeploymentrequestvespafield import ( - RegisterDeploymentRequestVespaField, - RegisterDeploymentRequestVespaFieldTypedDict, -) from mistralai.client.types import ( BaseModel, Nullable, @@ -16,33 +12,48 @@ ) from mistralai.client.types.basemodel import current_filtered_dump from pydantic import model_serializer -from typing import List from typing_extensions import NotRequired, TypedDict -class RegisterDeploymentRequestVespaIndexTypedDict(TypedDict): - name: str - fields: List[RegisterDeploymentRequestVespaFieldTypedDict] - sd: str - embedding_dimensions: NotRequired[Nullable[int]] +class MissingGoalItemTypedDict(TypedDict): + r"""A run evaluator goal on a metric the scorer did not return: it fails, with no number to show. + + Kept out of ``results`` so ``GoalResultItem.actual`` stays a number for clients that require one. + """ + + metric: str + operator: str + message: str + target: NotRequired[Nullable[float]] + target_min: NotRequired[Nullable[float]] + target_max: NotRequired[Nullable[float]] + + +class MissingGoalItem(BaseModel): + r"""A run evaluator goal on a metric the scorer did not return: it fails, with no number to show. + + Kept out of ``results`` so ``GoalResultItem.actual`` stays a number for clients that require one. + """ + + metric: str + operator: str -class RegisterDeploymentRequestVespaIndex(BaseModel): - name: str + message: str - fields: List[RegisterDeploymentRequestVespaField] + target: OptionalNullable[float] = UNSET - sd: str + target_min: OptionalNullable[float] = UNSET - embedding_dimensions: OptionalNullable[int] = UNSET + target_max: OptionalNullable[float] = UNSET @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) def serialize_model(self, handler): - optional_fields = set(["embedding_dimensions"]) - nullable_fields = set(["embedding_dimensions"]) + optional_fields = set(["target", "target_min", "target_max"]) + nullable_fields = set(["target", "target_min", "target_max"]) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() serialized = handler(self) diff --git a/src/mistralai/client/models/moderationrequest.py b/src/mistralai/client/models/moderationrequest.py new file mode 100644 index 000000000..0e17a4064 --- /dev/null +++ b/src/mistralai/client/models/moderationrequest.py @@ -0,0 +1,90 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + current_exclude_none, + serialize_with_info, +) +from mistralai.client.types.basemodel import current_filtered_dump +import pydantic +from pydantic import model_serializer +from typing import Any, Dict, List, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +ModerationRequestInputsTypedDict = TypeAliasType( + "ModerationRequestInputsTypedDict", Union[str, List[str]] +) +r"""Text to moderate.""" + + +ModerationRequestInputs = TypeAliasType( + "ModerationRequestInputs", Union[str, List[str]] +) +r"""Text to moderate.""" + + +class ModerationRequestTypedDict(TypedDict): + model: str + r"""ID of the model to use.""" + inputs: ModerationRequestInputsTypedDict + r"""Text to moderate.""" + metadata: NotRequired[Nullable[Dict[str, Any]]] + queries: NotRequired[Nullable[Dict[str, str]]] + r"""Named moderation queries to evaluate.""" + + +class ModerationRequest(BaseModel): + model: str + r"""ID of the model to use.""" + + inputs: Annotated[ModerationRequestInputs, pydantic.Field(alias="input")] + r"""Text to moderate.""" + + metadata: OptionalNullable[Dict[str, Any]] = UNSET + + queries: OptionalNullable[Dict[str, str]] = UNSET + r"""Named moderation queries to evaluate.""" + + @model_serializer(mode="wrap") + def _serialize_model_with_info(self, handler, info): + return serialize_with_info(self.serialize_model, handler, info) + + def serialize_model(self, handler): + optional_fields = set(["metadata", "queries"]) + nullable_fields = set(["metadata", "queries"]) + exclude_none = current_exclude_none() + skip_filtered = exclude_none is False or current_filtered_dump() + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias if f.alias is not None else n + if k not in serialized and n not in serialized and skip_filtered: + continue + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + ModerationRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/oauth2authmethod.py b/src/mistralai/client/models/oauth2authmethod.py index 72da2b89c..17da698e3 100644 --- a/src/mistralai/client/models/oauth2authmethod.py +++ b/src/mistralai/client/models/oauth2authmethod.py @@ -17,8 +17,8 @@ OAuth2AuthMethodTypedDict = TypeAliasType( "OAuth2AuthMethodTypedDict", Union[ - OAuth2AuthorizationCodeAuthMethodTypedDict, OAuth2ClientCredentialsAuthMethodTypedDict, + OAuth2AuthorizationCodeAuthMethodTypedDict, ], ) diff --git a/src/mistralai/client/models/oauth2authorizationcodeauthmethod.py b/src/mistralai/client/models/oauth2authorizationcodeauthmethod.py index e2cb69c71..c1de69a14 100644 --- a/src/mistralai/client/models/oauth2authorizationcodeauthmethod.py +++ b/src/mistralai/client/models/oauth2authorizationcodeauthmethod.py @@ -28,6 +28,12 @@ from typing_extensions import Annotated, NotRequired, TypedDict +TokenEndpointAuthMethod = Literal[ + "client_secret_post", + "client_secret_basic", +] + + class OAuth2AuthorizationCodeAuthMethodTypedDict(TypedDict): auth_data: AuthDataTypedDict method_type: Literal["oauth2"] @@ -36,6 +42,8 @@ class OAuth2AuthorizationCodeAuthMethodTypedDict(TypedDict): grant_type: Literal["authorization_code"] oauth2_server_metadata: NotRequired[Nullable[ExtendedOAuthServerMetadataTypedDict]] r"""OAuth2 authorization server metadata (endpoints, scopes_supported, ...).""" + token_endpoint_auth_method: NotRequired[Nullable[TokenEndpointAuthMethod]] + r"""How the client secret is sent to the token endpoint: in the request body (client_secret_post) or in an HTTP Basic header (client_secret_basic). Defaults to client_secret_post.""" class OAuth2AuthorizationCodeAuthMethod(BaseModel): @@ -62,13 +70,25 @@ class OAuth2AuthorizationCodeAuthMethod(BaseModel): oauth2_server_metadata: OptionalNullable[ExtendedOAuthServerMetadata] = UNSET r"""OAuth2 authorization server metadata (endpoints, scopes_supported, ...).""" + token_endpoint_auth_method: OptionalNullable[TokenEndpointAuthMethod] = UNSET + r"""How the client secret is sent to the token endpoint: in the request body (client_secret_post) or in an HTTP Basic header (client_secret_basic). Defaults to client_secret_post.""" + @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) def serialize_model(self, handler): - optional_fields = set(["method_type", "headers", "oauth2_server_metadata"]) - nullable_fields = set(["headers", "oauth2_server_metadata"]) + optional_fields = set( + [ + "method_type", + "headers", + "oauth2_server_metadata", + "token_endpoint_auth_method", + ] + ) + nullable_fields = set( + ["headers", "oauth2_server_metadata", "token_endpoint_auth_method"] + ) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() serialized = handler(self) diff --git a/src/mistralai/client/models/observabilityerrorcode.py b/src/mistralai/client/models/observabilityerrorcode.py index 1565c1823..af0650489 100644 --- a/src/mistralai/client/models/observabilityerrorcode.py +++ b/src/mistralai/client/models/observabilityerrorcode.py @@ -32,6 +32,7 @@ "DATASET_NOT_FOUND", "DATASET_TASK_NOT_FOUND", "DATASET_RECORD_NOT_FOUND", + "DATASET_RECORD_ID_CONFLICT", "DATASET_RECORD_FORMAT_ERROR", "AGENT_NOT_FOUND", "AGENT_MISTRAL_API_ERROR", @@ -62,6 +63,7 @@ "TRACES_FILTER_QUERY_PARSE_ERROR", "TRACE_NOT_FOUND", "SPAN_NOT_FOUND", + "OCSF_NOT_ENABLED", ], UnrecognizedStr, ] diff --git a/src/mistralai/client/models/getdeploymentsummariesresponsevespaindex.py b/src/mistralai/client/models/prompttokensdetails.py similarity index 64% rename from src/mistralai/client/models/getdeploymentsummariesresponsevespaindex.py rename to src/mistralai/client/models/prompttokensdetails.py index 26582b5d4..3f4412fda 100644 --- a/src/mistralai/client/models/getdeploymentsummariesresponsevespaindex.py +++ b/src/mistralai/client/models/prompttokensdetails.py @@ -3,34 +3,36 @@ from __future__ import annotations from mistralai.client.types import ( BaseModel, - Nullable, UNSET_SENTINEL, current_exclude_none, serialize_with_info, ) from mistralai.client.types.basemodel import current_filtered_dump from pydantic import model_serializer -from typing_extensions import TypedDict +from typing import Optional +from typing_extensions import NotRequired, TypedDict -class GetDeploymentSummariesResponseVespaIndexTypedDict(TypedDict): - id: str - name: str - document_count: Nullable[int] +class PromptTokensDetailsTypedDict(TypedDict): + r"""Token usage details for the prompt.""" + cached_tokens: NotRequired[int] + audio_tokens: NotRequired[int] -class GetDeploymentSummariesResponseVespaIndex(BaseModel): - id: str - name: str +class PromptTokensDetails(BaseModel): + r"""Token usage details for the prompt.""" - document_count: Nullable[int] + cached_tokens: Optional[int] = 0 + + audio_tokens: Optional[int] = 0 @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) def serialize_model(self, handler): + optional_fields = set(["cached_tokens", "audio_tokens"]) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() serialized = handler(self) @@ -43,6 +45,7 @@ def serialize_model(self, handler): val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: - m[k] = val + if val is not None or k not in optional_fields: + m[k] = val return m diff --git a/src/mistralai/client/models/realtimespeechsession.py b/src/mistralai/client/models/realtimespeechsession.py index fd9c2d244..b91e05b29 100644 --- a/src/mistralai/client/models/realtimespeechsession.py +++ b/src/mistralai/client/models/realtimespeechsession.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .ipaphoneme import IPAPhoneme from .realtimespeechstreamingmode import RealtimeSpeechStreamingMode from .speechoutputformat import SpeechOutputFormat from mistralai.client.types import ( @@ -14,6 +15,7 @@ ) from mistralai.client.types.basemodel import current_filtered_dump from pydantic import model_serializer +from typing import Dict, List from typing_extensions import NotRequired, TypedDict @@ -25,6 +27,7 @@ class RealtimeSpeechSessionTypedDict(TypedDict): response_format: SpeechOutputFormat expressiveness: float voice: NotRequired[Nullable[str]] + phoneme_hints: NotRequired[Nullable[Dict[str, List[IPAPhoneme]]]] class RealtimeSpeechSession(BaseModel): @@ -42,13 +45,15 @@ class RealtimeSpeechSession(BaseModel): voice: OptionalNullable[str] = UNSET + phoneme_hints: OptionalNullable[Dict[str, List[IPAPhoneme]]] = UNSET + @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) def serialize_model(self, handler): - optional_fields = set(["voice"]) - nullable_fields = set(["voice"]) + optional_fields = set(["voice", "phoneme_hints"]) + nullable_fields = set(["voice", "phoneme_hints"]) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() serialized = handler(self) diff --git a/src/mistralai/client/models/realtimespeechsessionupdatepayload.py b/src/mistralai/client/models/realtimespeechsessionupdatepayload.py index 27972f5fe..755f1c56b 100644 --- a/src/mistralai/client/models/realtimespeechsessionupdatepayload.py +++ b/src/mistralai/client/models/realtimespeechsessionupdatepayload.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .ipaphoneme import IPAPhoneme from .realtimespeechstreamingmode import RealtimeSpeechStreamingMode from .speechoutputformat import SpeechOutputFormat from mistralai.client.types import ( @@ -14,6 +15,7 @@ ) from mistralai.client.types.basemodel import current_filtered_dump from pydantic import model_serializer +from typing import Dict, List from typing_extensions import NotRequired, TypedDict @@ -28,6 +30,8 @@ class RealtimeSpeechSessionUpdatePayloadTypedDict(TypedDict): r"""Audio encoding of speech.audio.delta events. pcm is raw 32-bit float little-endian mono.""" expressiveness: NotRequired[Nullable[float]] r"""Higher values make the delivery more expressive. Minimum 1.0.""" + phoneme_hints: NotRequired[Nullable[Dict[str, List[IPAPhoneme]]]] + r"""Pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones. Replaces the current hints; an empty object clears them.""" class RealtimeSpeechSessionUpdatePayload(BaseModel): @@ -46,6 +50,9 @@ class RealtimeSpeechSessionUpdatePayload(BaseModel): expressiveness: OptionalNullable[float] = UNSET r"""Higher values make the delivery more expressive. Minimum 1.0.""" + phoneme_hints: OptionalNullable[Dict[str, List[IPAPhoneme]]] = UNSET + r"""Pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones. Replaces the current hints; an empty object clears them.""" + @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) @@ -58,6 +65,7 @@ def serialize_model(self, handler): "streaming_mode", "response_format", "expressiveness", + "phoneme_hints", ] ) nullable_fields = set( @@ -67,6 +75,7 @@ def serialize_model(self, handler): "streaming_mode", "response_format", "expressiveness", + "phoneme_hints", ] ) exclude_none = current_exclude_none() diff --git a/src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py b/src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py index 02672880e..eca462281 100644 --- a/src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py +++ b/src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py @@ -26,7 +26,7 @@ class RealtimeTranscriptionSessionUpdatePayloadTypedDict(TypedDict): diarize: NotRequired[Nullable[bool]] r"""Inline speaker tagging. Set before audio starts.""" context_bias: NotRequired[Nullable[List[str]]] - r"""Anticipated phrases or terms to bias transcription towards. Set before audio starts.""" + r"""Anticipated phrases or terms to bias transcription towards. Replaces the current list. Can be updated after audio starts: takes effect after the next input_audio.flush, or from the next utterance if no audio was sent since the last flush.""" language: NotRequired[Nullable[str]] r"""ISO-639-1 code of the input audio language. Set before audio starts.""" speaker_references: NotRequired[Nullable[Dict[str, str]]] @@ -46,7 +46,7 @@ class RealtimeTranscriptionSessionUpdatePayload(BaseModel): r"""Inline speaker tagging. Set before audio starts.""" context_bias: OptionalNullable[List[str]] = UNSET - r"""Anticipated phrases or terms to bias transcription towards. Set before audio starts.""" + r"""Anticipated phrases or terms to bias transcription towards. Replaces the current list. Can be updated after audio starts: takes effect after the next input_audio.flush, or from the next utterance if no audio was sent since the last flush.""" language: OptionalNullable[str] = UNSET r"""ISO-639-1 code of the input audio language. Set before audio starts.""" diff --git a/src/mistralai/client/models/registerdeploymentrequestdeployment.py b/src/mistralai/client/models/registerdeploymentrequestdeployment.py deleted file mode 100644 index d80301824..000000000 --- a/src/mistralai/client/models/registerdeploymentrequestdeployment.py +++ /dev/null @@ -1,68 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .registerdeploymentrequestvespadeployment import ( - RegisterDeploymentRequestVespaDeployment, - RegisterDeploymentRequestVespaDeploymentTypedDict, -) -from mistralai.client.types import ( - BaseModel, - UNSET_SENTINEL, - current_exclude_none, - serialize_with_info, -) -from mistralai.client.types.basemodel import current_filtered_dump -from pydantic import model_serializer -from typing import Literal, Optional -from typing_extensions import NotRequired, TypedDict - - -RegisterDeploymentRequestDeploymentStatus = Literal[ - "online", - "offline", -] - - -RegisterDeploymentRequestDeploymentDeploymentTypedDict = ( - RegisterDeploymentRequestVespaDeploymentTypedDict -) - - -RegisterDeploymentRequestDeploymentDeployment = RegisterDeploymentRequestVespaDeployment - - -class RegisterDeploymentRequestDeploymentTypedDict(TypedDict): - name: str - deployment: RegisterDeploymentRequestDeploymentDeploymentTypedDict - status: NotRequired[RegisterDeploymentRequestDeploymentStatus] - - -class RegisterDeploymentRequestDeployment(BaseModel): - name: str - - deployment: RegisterDeploymentRequestDeploymentDeployment - - status: Optional[RegisterDeploymentRequestDeploymentStatus] = "offline" - - @model_serializer(mode="wrap") - def _serialize_model_with_info(self, handler, info): - return serialize_with_info(self.serialize_model, handler, info) - - def serialize_model(self, handler): - optional_fields = set(["status"]) - exclude_none = current_exclude_none() - skip_filtered = exclude_none is False or current_filtered_dump() - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias if f.alias is not None else n - if k not in serialized and n not in serialized and skip_filtered: - continue - 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/registerdeploymentrequestvespadeployment.py b/src/mistralai/client/models/registerdeploymentrequestvespadeployment.py deleted file mode 100644 index f392f9248..000000000 --- a/src/mistralai/client/models/registerdeploymentrequestvespadeployment.py +++ /dev/null @@ -1,39 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .registerdeploymentrequestvespaindex import ( - RegisterDeploymentRequestVespaIndex, - RegisterDeploymentRequestVespaIndexTypedDict, -) -from mistralai.client.types import BaseModel -from mistralai.client.utils import validate_const -import pydantic -from pydantic.functional_validators import AfterValidator -from typing import List, Literal -from typing_extensions import Annotated, TypedDict - - -class RegisterDeploymentRequestVespaDeploymentTypedDict(TypedDict): - vespa_version: str - indexes: List[RegisterDeploymentRequestVespaIndexTypedDict] - query_url: str - type: Literal["vespa"] - - -class RegisterDeploymentRequestVespaDeployment(BaseModel): - vespa_version: str - - indexes: List[RegisterDeploymentRequestVespaIndex] - - query_url: str - - type: Annotated[ - Annotated[Literal["vespa"], AfterValidator(validate_const("vespa"))], - pydantic.Field(alias="type"), - ] = "vespa" - - -try: - RegisterDeploymentRequestVespaDeployment.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/registerdeploymentrequestvespafield.py b/src/mistralai/client/models/registerdeploymentrequestvespafield.py deleted file mode 100644 index f3ce76d67..000000000 --- a/src/mistralai/client/models/registerdeploymentrequestvespafield.py +++ /dev/null @@ -1,61 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .schemafielddatatype import SchemaFieldDataType -from .schemafieldindex import SchemaFieldIndex -from .schemafieldrankingtype import SchemaFieldRankingType -from .schemafieldstorage import SchemaFieldStorage -from mistralai.client.types import ( - BaseModel, - Nullable, - UNSET_SENTINEL, - current_exclude_none, - serialize_with_info, -) -from mistralai.client.types.basemodel import current_filtered_dump -from pydantic import model_serializer -from typing_extensions import TypedDict - - -class RegisterDeploymentRequestVespaFieldTypedDict(TypedDict): - name: str - type: SchemaFieldDataType - storage: SchemaFieldStorage - ranking: SchemaFieldRankingType - index_type: Nullable[SchemaFieldIndex] - multidimensional: bool - - -class RegisterDeploymentRequestVespaField(BaseModel): - name: str - - type: SchemaFieldDataType - - storage: SchemaFieldStorage - - ranking: SchemaFieldRankingType - - index_type: Nullable[SchemaFieldIndex] - - multidimensional: bool - - @model_serializer(mode="wrap") - def _serialize_model_with_info(self, handler, info): - return serialize_with_info(self.serialize_model, handler, info) - - def serialize_model(self, handler): - exclude_none = current_exclude_none() - skip_filtered = exclude_none is False or current_filtered_dump() - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias if f.alias is not None else n - if k not in serialized and n not in serialized and skip_filtered: - continue - val = serialized.get(k, serialized.get(n)) - - if val != UNSET_SENTINEL: - m[k] = val - - return m diff --git a/src/mistralai/client/models/registersearchindexresponseindex.py b/src/mistralai/client/models/registersearchindexresponseindex.py deleted file mode 100644 index cd4bced7c..000000000 --- a/src/mistralai/client/models/registersearchindexresponseindex.py +++ /dev/null @@ -1,13 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from mistralai.client.types import BaseModel -from typing_extensions import TypedDict - - -class RegisterSearchIndexResponseIndexTypedDict(TypedDict): - id: str - - -class RegisterSearchIndexResponseIndex(BaseModel): - id: str diff --git a/src/mistralai/client/models/responseformat.py b/src/mistralai/client/models/responseformat.py index 52224e863..f0f3358e6 100644 --- a/src/mistralai/client/models/responseformat.py +++ b/src/mistralai/client/models/responseformat.py @@ -19,14 +19,14 @@ class ResponseFormatTypedDict(TypedDict): - 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.""" + 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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt.""" type: NotRequired[ResponseFormats] json_schema: NotRequired[Nullable[JSONSchemaTypedDict]] class ResponseFormat(BaseModel): - 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.""" + 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. Note: on third-party models (for example GLM), the schema is still enforced, but field descriptions may not influence the output; put field-level requirements in the prompt.""" type: Optional[ResponseFormats] = None diff --git a/src/mistralai/client/models/scalarstatisticvalue.py b/src/mistralai/client/models/scalarstatisticvalue.py index d517a796f..bf0364eed 100644 --- a/src/mistralai/client/models/scalarstatisticvalue.py +++ b/src/mistralai/client/models/scalarstatisticvalue.py @@ -32,6 +32,7 @@ class ScalarStatisticValueTypedDict(TypedDict): id: str type: Literal["scalar"] value: NotRequired[Nullable[float]] + sample_count: NotRequired[Nullable[int]] class ScalarStatisticValue(BaseModel): @@ -55,13 +56,15 @@ class ScalarStatisticValue(BaseModel): value: OptionalNullable[float] = UNSET + sample_count: OptionalNullable[int] = UNSET + @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) def serialize_model(self, handler): - optional_fields = set(["type", "value"]) - nullable_fields = set(["value"]) + optional_fields = set(["type", "value", "sample_count"]) + nullable_fields = set(["value", "sample_count"]) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() serialized = handler(self) diff --git a/src/mistralai/client/models/schemafielddatatype.py b/src/mistralai/client/models/schemafielddatatype.py deleted file mode 100644 index f2bd97282..000000000 --- a/src/mistralai/client/models/schemafielddatatype.py +++ /dev/null @@ -1,14 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from typing import Literal - - -SchemaFieldDataType = Literal[ - "int", - "bool", - "string", - "embedding", - "long", - "float", -] diff --git a/src/mistralai/client/models/schemafieldindex.py b/src/mistralai/client/models/schemafieldindex.py deleted file mode 100644 index 62b1d17e2..000000000 --- a/src/mistralai/client/models/schemafieldindex.py +++ /dev/null @@ -1,11 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from typing import Literal - - -SchemaFieldIndex = Literal[ - "ann", - "bm25", - "attribute", -] diff --git a/src/mistralai/client/models/schemafieldrankingtype.py b/src/mistralai/client/models/schemafieldrankingtype.py deleted file mode 100644 index 9bde1b4f2..000000000 --- a/src/mistralai/client/models/schemafieldrankingtype.py +++ /dev/null @@ -1,16 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from typing import Literal - - -SchemaFieldRankingType = Literal[ - "count", - "embedding", - "timestamp", - "text", - "string", - "bool", - "int", - "language", -] diff --git a/src/mistralai/client/models/schemafieldstorage.py b/src/mistralai/client/models/schemafieldstorage.py deleted file mode 100644 index 06d02c5b3..000000000 --- a/src/mistralai/client/models/schemafieldstorage.py +++ /dev/null @@ -1,10 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from typing import Literal - - -SchemaFieldStorage = Literal[ - "in_memory", - "on_disk", -] diff --git a/src/mistralai/client/models/scoremetric.py b/src/mistralai/client/models/scoremetric.py new file mode 100644 index 000000000..16f5d3ecc --- /dev/null +++ b/src/mistralai/client/models/scoremetric.py @@ -0,0 +1,29 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import Union +from typing_extensions import TypeAliasType, TypedDict + + +ScoreMetricValueTypedDict = TypeAliasType( + "ScoreMetricValueTypedDict", Union[int, float] +) + + +ScoreMetricValue = TypeAliasType("ScoreMetricValue", Union[int, float]) + + +class ScoreMetricTypedDict(TypedDict): + r"""One named number of a run evaluator score. Stored and sent as an ordered list (JSONB keeps no key order).""" + + name: str + value: ScoreMetricValueTypedDict + + +class ScoreMetric(BaseModel): + r"""One named number of a run evaluator score. Stored and sent as an ordered list (JSONB keeps no key order).""" + + name: str + + value: ScoreMetricValue diff --git a/src/mistralai/client/models/signalinvocationbody.py b/src/mistralai/client/models/signalinvocationbody.py index 157a54607..b0208b2e4 100644 --- a/src/mistralai/client/models/signalinvocationbody.py +++ b/src/mistralai/client/models/signalinvocationbody.py @@ -91,11 +91,25 @@ def serialize_model(self, handler): r"""Input data for the signal, matching its schema""" +SignalInvocationBodyCallContextTypedDict = TypeAliasType( + "SignalInvocationBodyCallContextTypedDict", Union[bool, int, str] +) + + +SignalInvocationBodyCallContext = TypeAliasType( + "SignalInvocationBodyCallContext", Union[bool, int, str] +) + + class SignalInvocationBodyTypedDict(TypedDict): name: str r"""The name of the signal to send""" input: NotRequired[Nullable[SignalInvocationBodyInputTypedDict]] r"""Input data for the signal, matching its schema""" + call_context: NotRequired[ + Nullable[Dict[str, SignalInvocationBodyCallContextTypedDict]] + ] + r"""Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here.""" class SignalInvocationBody(BaseModel): @@ -105,13 +119,16 @@ class SignalInvocationBody(BaseModel): input: OptionalNullable[SignalInvocationBodyInput] = UNSET r"""Input data for the signal, matching its schema""" + call_context: OptionalNullable[Dict[str, SignalInvocationBodyCallContext]] = UNSET + r"""Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here.""" + @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) def serialize_model(self, handler): - optional_fields = set(["input"]) - nullable_fields = set(["input"]) + optional_fields = set(["input", "call_context"]) + nullable_fields = set(["input", "call_context"]) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() serialized = handler(self) diff --git a/src/mistralai/client/models/simplenumericstatisticspec.py b/src/mistralai/client/models/simplenumericstatisticspec.py index 1f239b9e4..5679fdf51 100644 --- a/src/mistralai/client/models/simplenumericstatisticspec.py +++ b/src/mistralai/client/models/simplenumericstatisticspec.py @@ -32,17 +32,30 @@ class SimpleNumericStatisticSpecTypedDict(TypedDict): - r"""A scalar numeric reduction with no parameters (``avg``/``sum``/``min``/``max``/``std``/``count``).""" + r"""A scalar numeric reduction (``avg``/``sum``/``min``/``max``/``std``/``count``). + + ``weight_key`` (``avg`` only) turns the mean into a weighted mean, ``sum(w * x) / sum(w)``, where + each score's weight ``w`` is read from its ``metadata`` under that key. Scores whose weight is + missing, non-numeric or negative are left out of that statistic. + """ kind: SimpleNumericStatisticSpecKind + weight_key: NotRequired[Nullable[str]] goal: NotRequired[Nullable[GoalSpecTypedDict]] class SimpleNumericStatisticSpec(BaseModel): - r"""A scalar numeric reduction with no parameters (``avg``/``sum``/``min``/``max``/``std``/``count``).""" + r"""A scalar numeric reduction (``avg``/``sum``/``min``/``max``/``std``/``count``). + + ``weight_key`` (``avg`` only) turns the mean into a weighted mean, ``sum(w * x) / sum(w)``, where + each score's weight ``w`` is read from its ``metadata`` under that key. Scores whose weight is + missing, non-numeric or negative are left out of that statistic. + """ kind: SimpleNumericStatisticSpecKind + weight_key: OptionalNullable[str] = UNSET + goal: OptionalNullable[GoalSpec] = UNSET @model_serializer(mode="wrap") @@ -50,8 +63,8 @@ def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) def serialize_model(self, handler): - optional_fields = set(["goal"]) - nullable_fields = set(["goal"]) + optional_fields = set(["weight_key", "goal"]) + nullable_fields = set(["weight_key", "goal"]) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() serialized = handler(self) diff --git a/src/mistralai/client/models/toolcall.py b/src/mistralai/client/models/toolcall.py index dd59f66d0..56c7cdb50 100644 --- a/src/mistralai/client/models/toolcall.py +++ b/src/mistralai/client/models/toolcall.py @@ -16,26 +16,26 @@ class ToolCallTypedDict(TypedDict): function: FunctionCallTypedDict - id: NotRequired[str] type: NotRequired[str] index: NotRequired[int] + id: NotRequired[str] class ToolCall(BaseModel): function: FunctionCall - id: Optional[str] = "null" - type: Optional[str] = "function" index: Optional[int] = 0 + id: Optional[str] = None + @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) def serialize_model(self, handler): - optional_fields = set(["id", "type", "index"]) + optional_fields = set(["type", "index", "id"]) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() serialized = handler(self) diff --git a/src/mistralai/client/models/toolchoice.py b/src/mistralai/client/models/toolchoice.py index b86a3a24f..5257f9e2b 100644 --- a/src/mistralai/client/models/toolchoice.py +++ b/src/mistralai/client/models/toolchoice.py @@ -15,16 +15,12 @@ class ToolChoiceTypedDict(TypedDict): - r"""ToolChoice is either a ToolChoiceEnum or a ToolChoice""" - function: FunctionNameTypedDict r"""this restriction of `Function` is used to select a specific function to call""" type: NotRequired[str] class ToolChoice(BaseModel): - r"""ToolChoice is either a ToolChoiceEnum or a ToolChoice""" - function: FunctionName r"""this restriction of `Function` is used to select a specific function to call""" diff --git a/src/mistralai/client/models/transcriptionstreamevents.py b/src/mistralai/client/models/transcriptionstreamevents.py index 4df0f9821..895223b18 100644 --- a/src/mistralai/client/models/transcriptionstreamevents.py +++ b/src/mistralai/client/models/transcriptionstreamevents.py @@ -18,6 +18,19 @@ TranscriptionStreamTextDelta, TranscriptionStreamTextDeltaTypedDict, ) +from .turndetectioneagerendevent import ( + TurnDetectionEagerEndEvent, + TurnDetectionEagerEndEventTypedDict, +) +from .turndetectionendevent import TurnDetectionEndEvent, TurnDetectionEndEventTypedDict +from .turndetectionresumeevent import ( + TurnDetectionResumeEvent, + TurnDetectionResumeEventTypedDict, +) +from .turndetectionstartevent import ( + TurnDetectionStartEvent, + TurnDetectionStartEventTypedDict, +) from functools import partial from mistralai.client.types import BaseModel from mistralai.client.utils.unions import parse_open_union @@ -30,8 +43,12 @@ TranscriptionStreamEventsDataTypedDict = TypeAliasType( "TranscriptionStreamEventsDataTypedDict", Union[ + TurnDetectionStartEventTypedDict, + TurnDetectionEagerEndEventTypedDict, + TurnDetectionResumeEventTypedDict, TranscriptionStreamTextDeltaTypedDict, TranscriptionStreamLanguageTypedDict, + TurnDetectionEndEventTypedDict, TranscriptionStreamSegmentDeltaTypedDict, TranscriptionStreamDoneTypedDict, ], @@ -53,6 +70,10 @@ class UnknownTranscriptionStreamEventsData(BaseModel): "transcription.language": TranscriptionStreamLanguage, "transcription.segment": TranscriptionStreamSegmentDelta, "transcription.text.delta": TranscriptionStreamTextDelta, + "turn.eager_end": TurnDetectionEagerEndEvent, + "turn.end": TurnDetectionEndEvent, + "turn.resume": TurnDetectionResumeEvent, + "turn.start": TurnDetectionStartEvent, } @@ -62,6 +83,10 @@ class UnknownTranscriptionStreamEventsData(BaseModel): TranscriptionStreamLanguage, TranscriptionStreamSegmentDelta, TranscriptionStreamTextDelta, + TurnDetectionEagerEndEvent, + TurnDetectionEndEvent, + TurnDetectionResumeEvent, + TurnDetectionStartEvent, UnknownTranscriptionStreamEventsData, ], BeforeValidator( diff --git a/src/mistralai/client/models/transcriptionstreameventtypes.py b/src/mistralai/client/models/transcriptionstreameventtypes.py index cb6b28898..128199628 100644 --- a/src/mistralai/client/models/transcriptionstreameventtypes.py +++ b/src/mistralai/client/models/transcriptionstreameventtypes.py @@ -11,6 +11,10 @@ "transcription.segment", "transcription.text.delta", "transcription.done", + "turn.start", + "turn.eager_end", + "turn.resume", + "turn.end", ], UnrecognizedStr, ] diff --git a/src/mistralai/client/models/turndetectioneagerendevent.py b/src/mistralai/client/models/turndetectioneagerendevent.py index 1ffc4f942..4bedf9186 100644 --- a/src/mistralai/client/models/turndetectioneagerendevent.py +++ b/src/mistralai/client/models/turndetectioneagerendevent.py @@ -1,18 +1,11 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from mistralai.client.types import ( - BaseModel, - UNSET_SENTINEL, - current_exclude_none, - serialize_with_info, -) -from mistralai.client.types.basemodel import current_filtered_dump +from mistralai.client.types import BaseModel from mistralai.client.utils import validate_const import pydantic -from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional +from typing import Literal from typing_extensions import Annotated, TypedDict @@ -26,35 +19,11 @@ class TurnDetectionEagerEndEvent(BaseModel): type: Annotated[ Annotated[ - Optional[Literal["turn.eager_end"]], - AfterValidator(validate_const("turn.eager_end")), + Literal["turn.eager_end"], AfterValidator(validate_const("turn.eager_end")) ], pydantic.Field(alias="type"), ] = "turn.eager_end" - @model_serializer(mode="wrap") - def _serialize_model_with_info(self, handler, info): - return serialize_with_info(self.serialize_model, handler, info) - - def serialize_model(self, handler): - optional_fields = set(["type"]) - exclude_none = current_exclude_none() - skip_filtered = exclude_none is False or current_filtered_dump() - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias if f.alias is not None else n - if k not in serialized and n not in serialized and skip_filtered: - continue - 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: TurnDetectionEagerEndEvent.model_rebuild() diff --git a/src/mistralai/client/models/turndetectionendevent.py b/src/mistralai/client/models/turndetectionendevent.py index c6aa11339..bb7a9ac38 100644 --- a/src/mistralai/client/models/turndetectionendevent.py +++ b/src/mistralai/client/models/turndetectionendevent.py @@ -2,18 +2,11 @@ from __future__ import annotations from .turndetectionendreason import TurnDetectionEndReason -from mistralai.client.types import ( - BaseModel, - UNSET_SENTINEL, - current_exclude_none, - serialize_with_info, -) -from mistralai.client.types.basemodel import current_filtered_dump +from mistralai.client.types import BaseModel from mistralai.client.utils import validate_const import pydantic -from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional +from typing import Literal from typing_extensions import Annotated, TypedDict @@ -29,35 +22,10 @@ class TurnDetectionEndEvent(BaseModel): end_reason: TurnDetectionEndReason type: Annotated[ - Annotated[ - Optional[Literal["turn.end"]], AfterValidator(validate_const("turn.end")) - ], + Annotated[Literal["turn.end"], AfterValidator(validate_const("turn.end"))], pydantic.Field(alias="type"), ] = "turn.end" - @model_serializer(mode="wrap") - def _serialize_model_with_info(self, handler, info): - return serialize_with_info(self.serialize_model, handler, info) - - def serialize_model(self, handler): - optional_fields = set(["type"]) - exclude_none = current_exclude_none() - skip_filtered = exclude_none is False or current_filtered_dump() - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias if f.alias is not None else n - if k not in serialized and n not in serialized and skip_filtered: - continue - 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: TurnDetectionEndEvent.model_rebuild() diff --git a/src/mistralai/client/models/turndetectionendreason.py b/src/mistralai/client/models/turndetectionendreason.py index fd69a5af0..86a080032 100644 --- a/src/mistralai/client/models/turndetectionendreason.py +++ b/src/mistralai/client/models/turndetectionendreason.py @@ -1,10 +1,14 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from typing import Literal +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union -TurnDetectionEndReason = Literal[ - "threshold", - "timeout", +TurnDetectionEndReason = Union[ + Literal[ + "threshold", + "timeout", + ], + UnrecognizedStr, ] diff --git a/src/mistralai/client/models/turndetectionresumeevent.py b/src/mistralai/client/models/turndetectionresumeevent.py index b6e07a69b..6f405ffbd 100644 --- a/src/mistralai/client/models/turndetectionresumeevent.py +++ b/src/mistralai/client/models/turndetectionresumeevent.py @@ -1,18 +1,11 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from mistralai.client.types import ( - BaseModel, - UNSET_SENTINEL, - current_exclude_none, - serialize_with_info, -) -from mistralai.client.types.basemodel import current_filtered_dump +from mistralai.client.types import BaseModel from mistralai.client.utils import validate_const import pydantic -from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional +from typing import Literal from typing_extensions import Annotated, TypedDict @@ -26,35 +19,11 @@ class TurnDetectionResumeEvent(BaseModel): type: Annotated[ Annotated[ - Optional[Literal["turn.resume"]], - AfterValidator(validate_const("turn.resume")), + Literal["turn.resume"], AfterValidator(validate_const("turn.resume")) ], pydantic.Field(alias="type"), ] = "turn.resume" - @model_serializer(mode="wrap") - def _serialize_model_with_info(self, handler, info): - return serialize_with_info(self.serialize_model, handler, info) - - def serialize_model(self, handler): - optional_fields = set(["type"]) - exclude_none = current_exclude_none() - skip_filtered = exclude_none is False or current_filtered_dump() - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias if f.alias is not None else n - if k not in serialized and n not in serialized and skip_filtered: - continue - 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: TurnDetectionResumeEvent.model_rebuild() diff --git a/src/mistralai/client/models/turndetectionstartevent.py b/src/mistralai/client/models/turndetectionstartevent.py index 8b37f4930..7e88d9a61 100644 --- a/src/mistralai/client/models/turndetectionstartevent.py +++ b/src/mistralai/client/models/turndetectionstartevent.py @@ -1,18 +1,11 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from mistralai.client.types import ( - BaseModel, - UNSET_SENTINEL, - current_exclude_none, - serialize_with_info, -) -from mistralai.client.types.basemodel import current_filtered_dump +from mistralai.client.types import BaseModel from mistralai.client.utils import validate_const import pydantic -from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional +from typing import Literal from typing_extensions import Annotated, TypedDict @@ -25,36 +18,10 @@ class TurnDetectionStartEvent(BaseModel): time_s: float type: Annotated[ - Annotated[ - Optional[Literal["turn.start"]], - AfterValidator(validate_const("turn.start")), - ], + Annotated[Literal["turn.start"], AfterValidator(validate_const("turn.start"))], pydantic.Field(alias="type"), ] = "turn.start" - @model_serializer(mode="wrap") - def _serialize_model_with_info(self, handler, info): - return serialize_with_info(self.serialize_model, handler, info) - - def serialize_model(self, handler): - optional_fields = set(["type"]) - exclude_none = current_exclude_none() - skip_filtered = exclude_none is False or current_filtered_dump() - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias if f.alias is not None else n - if k not in serialized and n not in serialized and skip_filtered: - continue - 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: TurnDetectionStartEvent.model_rebuild() diff --git a/src/mistralai/client/models/unregister_deployment_v1_rag_deployments_deployment_id_deleteop.py b/src/mistralai/client/models/unregister_deployment_v1_rag_deployments_deployment_id_deleteop.py deleted file mode 100644 index 4a33c7f27..000000000 --- a/src/mistralai/client/models/unregister_deployment_v1_rag_deployments_deployment_id_deleteop.py +++ /dev/null @@ -1,16 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from mistralai.client.types import BaseModel -from mistralai.client.utils import FieldMetadata, PathParamMetadata -from typing_extensions import Annotated, TypedDict - - -class UnregisterDeploymentV1RagDeploymentsDeploymentIDDeleteRequestTypedDict(TypedDict): - deployment_id: str - - -class UnregisterDeploymentV1RagDeploymentsDeploymentIDDeleteRequest(BaseModel): - deployment_id: Annotated[ - str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) - ] diff --git a/src/mistralai/client/models/update_index_metrics_v1_rag_deployments_deployment_id_metrics_putop.py b/src/mistralai/client/models/update_index_metrics_v1_rag_deployments_deployment_id_metrics_putop.py deleted file mode 100644 index 499ed3703..000000000 --- a/src/mistralai/client/models/update_index_metrics_v1_rag_deployments_deployment_id_metrics_putop.py +++ /dev/null @@ -1,52 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .updatemetricsrequestdeploymentmetricsoffline import ( - UpdateMetricsRequestDeploymentMetricsOffline, - UpdateMetricsRequestDeploymentMetricsOfflineTypedDict, -) -from .updatemetricsrequestdeploymentmetricsonline import ( - UpdateMetricsRequestDeploymentMetricsOnline, - UpdateMetricsRequestDeploymentMetricsOnlineTypedDict, -) -from mistralai.client.types import BaseModel -from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata -from pydantic import Field -from typing import Union -from typing_extensions import Annotated, TypeAliasType, TypedDict - - -MetricsDataTypedDict = TypeAliasType( - "MetricsDataTypedDict", - Union[ - UpdateMetricsRequestDeploymentMetricsOfflineTypedDict, - UpdateMetricsRequestDeploymentMetricsOnlineTypedDict, - ], -) - - -MetricsData = Annotated[ - Union[ - UpdateMetricsRequestDeploymentMetricsOnline, - UpdateMetricsRequestDeploymentMetricsOffline, - ], - Field(discriminator="status"), -] - - -class UpdateIndexMetricsV1RagDeploymentsDeploymentIDMetricsPutRequestTypedDict( - TypedDict -): - deployment_id: str - request_body: MetricsDataTypedDict - - -class UpdateIndexMetricsV1RagDeploymentsDeploymentIDMetricsPutRequest(BaseModel): - deployment_id: Annotated[ - str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) - ] - - request_body: Annotated[ - MetricsData, - FieldMetadata(request=RequestMetadata(media_type="application/json")), - ] diff --git a/src/mistralai/client/models/updatedatasetrequest.py b/src/mistralai/client/models/updatedatasetrequest.py index 5920f5727..78cad47e3 100644 --- a/src/mistralai/client/models/updatedatasetrequest.py +++ b/src/mistralai/client/models/updatedatasetrequest.py @@ -12,12 +12,14 @@ ) from mistralai.client.types.basemodel import current_filtered_dump from pydantic import model_serializer +from typing import Any, Dict from typing_extensions import NotRequired, TypedDict class UpdateDatasetRequestTypedDict(TypedDict): name: NotRequired[Nullable[str]] description: NotRequired[Nullable[str]] + metadata: NotRequired[Nullable[Dict[str, Any]]] class UpdateDatasetRequest(BaseModel): @@ -25,13 +27,15 @@ class UpdateDatasetRequest(BaseModel): description: OptionalNullable[str] = UNSET + metadata: OptionalNullable[Dict[str, Any]] = UNSET + @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) def serialize_model(self, handler): - optional_fields = set(["name", "description"]) - nullable_fields = set(["name", "description"]) + optional_fields = set(["name", "description", "metadata"]) + nullable_fields = set(["name", "description", "metadata"]) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() serialized = handler(self) diff --git a/src/mistralai/client/models/updateinvocationbody.py b/src/mistralai/client/models/updateinvocationbody.py index 12dd0a8ca..078f6d99f 100644 --- a/src/mistralai/client/models/updateinvocationbody.py +++ b/src/mistralai/client/models/updateinvocationbody.py @@ -30,11 +30,25 @@ r"""Input data for the update, matching its schema""" +UpdateInvocationBodyCallContextTypedDict = TypeAliasType( + "UpdateInvocationBodyCallContextTypedDict", Union[bool, int, str] +) + + +UpdateInvocationBodyCallContext = TypeAliasType( + "UpdateInvocationBodyCallContext", Union[bool, int, str] +) + + class UpdateInvocationBodyTypedDict(TypedDict): name: str r"""The name of the update to request""" input: NotRequired[Nullable[UpdateInvocationBodyInputTypedDict]] r"""Input data for the update, matching its schema""" + call_context: NotRequired[ + Nullable[Dict[str, UpdateInvocationBodyCallContextTypedDict]] + ] + r"""Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here.""" class UpdateInvocationBody(BaseModel): @@ -44,13 +58,16 @@ class UpdateInvocationBody(BaseModel): input: OptionalNullable[UpdateInvocationBodyInput] = UNSET r"""Input data for the update, matching its schema""" + call_context: OptionalNullable[Dict[str, UpdateInvocationBodyCallContext]] = UNSET + r"""Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here.""" + @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) def serialize_model(self, handler): - optional_fields = set(["input"]) - nullable_fields = set(["input"]) + optional_fields = set(["input", "call_context"]) + nullable_fields = set(["input", "call_context"]) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() serialized = handler(self) diff --git a/src/mistralai/client/models/updatemetricsrequestdeploymentmetricsoffline.py b/src/mistralai/client/models/updatemetricsrequestdeploymentmetricsoffline.py deleted file mode 100644 index b1fa42167..000000000 --- a/src/mistralai/client/models/updatemetricsrequestdeploymentmetricsoffline.py +++ /dev/null @@ -1,59 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from mistralai.client.types import ( - BaseModel, - UNSET_SENTINEL, - current_exclude_none, - serialize_with_info, -) -from mistralai.client.types.basemodel import current_filtered_dump -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class UpdateMetricsRequestDeploymentMetricsOfflineTypedDict(TypedDict): - status: Literal["offline"] - clear_metrics: NotRequired[bool] - - -class UpdateMetricsRequestDeploymentMetricsOffline(BaseModel): - status: Annotated[ - Annotated[Literal["offline"], AfterValidator(validate_const("offline"))], - pydantic.Field(alias="status"), - ] = "offline" - - clear_metrics: Optional[bool] = False - - @model_serializer(mode="wrap") - def _serialize_model_with_info(self, handler, info): - return serialize_with_info(self.serialize_model, handler, info) - - def serialize_model(self, handler): - optional_fields = set(["clear_metrics"]) - exclude_none = current_exclude_none() - skip_filtered = exclude_none is False or current_filtered_dump() - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias if f.alias is not None else n - if k not in serialized and n not in serialized and skip_filtered: - continue - 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: - UpdateMetricsRequestDeploymentMetricsOffline.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/updatemetricsrequestdeploymentmetricsonline.py b/src/mistralai/client/models/updatemetricsrequestdeploymentmetricsonline.py deleted file mode 100644 index c099f60d9..000000000 --- a/src/mistralai/client/models/updatemetricsrequestdeploymentmetricsonline.py +++ /dev/null @@ -1,36 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from .updatemetricsrequestindexmetrics import ( - UpdateMetricsRequestIndexMetrics, - UpdateMetricsRequestIndexMetricsTypedDict, -) -from mistralai.client.types import BaseModel -from mistralai.client.utils import validate_const -import pydantic -from pydantic.functional_validators import AfterValidator -from typing import List, Literal -from typing_extensions import Annotated, TypedDict - - -class UpdateMetricsRequestDeploymentMetricsOnlineTypedDict(TypedDict): - document_count: int - index_metrics: List[UpdateMetricsRequestIndexMetricsTypedDict] - status: Literal["online"] - - -class UpdateMetricsRequestDeploymentMetricsOnline(BaseModel): - document_count: int - - index_metrics: List[UpdateMetricsRequestIndexMetrics] - - status: Annotated[ - Annotated[Literal["online"], AfterValidator(validate_const("online"))], - pydantic.Field(alias="status"), - ] = "online" - - -try: - UpdateMetricsRequestDeploymentMetricsOnline.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/updatemetricsrequestindexmetrics.py b/src/mistralai/client/models/updatemetricsrequestindexmetrics.py deleted file mode 100644 index f0c34210a..000000000 --- a/src/mistralai/client/models/updatemetricsrequestindexmetrics.py +++ /dev/null @@ -1,16 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from mistralai.client.types import BaseModel -from typing_extensions import TypedDict - - -class UpdateMetricsRequestIndexMetricsTypedDict(TypedDict): - name: str - document_count: int - - -class UpdateMetricsRequestIndexMetrics(BaseModel): - name: str - - document_count: int diff --git a/src/mistralai/client/models/usageinfo.py b/src/mistralai/client/models/usageinfo.py index 6ac2e7d5f..19523c41e 100644 --- a/src/mistralai/client/models/usageinfo.py +++ b/src/mistralai/client/models/usageinfo.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations +from .prompttokensdetails import PromptTokensDetails, PromptTokensDetailsTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -22,6 +23,7 @@ class UsageInfoTypedDict(TypedDict): completion_tokens: NotRequired[int] total_tokens: NotRequired[int] prompt_audio_seconds: NotRequired[Nullable[int]] + prompt_tokens_details: NotRequired[Nullable[PromptTokensDetailsTypedDict]] service_tier: NotRequired[Nullable[str]] r"""The service tier at which the request was processed: standard or priority.""" @@ -40,6 +42,8 @@ class UsageInfo(BaseModel): prompt_audio_seconds: OptionalNullable[int] = UNSET + prompt_tokens_details: OptionalNullable[PromptTokensDetails] = UNSET + service_tier: OptionalNullable[str] = UNSET r"""The service tier at which the request was processed: standard or priority.""" @@ -62,10 +66,13 @@ def serialize_model(self, handler): "completion_tokens", "total_tokens", "prompt_audio_seconds", + "prompt_tokens_details", "service_tier", ] ) - nullable_fields = set(["prompt_audio_seconds", "service_tier"]) + nullable_fields = set( + ["prompt_audio_seconds", "prompt_tokens_details", "service_tier"] + ) exclude_none = current_exclude_none() skip_filtered = exclude_none is False or current_filtered_dump() serialized = handler(self) diff --git a/src/mistralai/client/models/webhook.py b/src/mistralai/client/models/webhook.py index 14c0505d9..2d99c309b 100644 --- a/src/mistralai/client/models/webhook.py +++ b/src/mistralai/client/models/webhook.py @@ -43,11 +43,13 @@ class WebhookTypedDict(TypedDict): expires_at: Nullable[datetime] created_at: datetime updated_at: datetime + description: NotRequired[Nullable[str]] url_verification_token: NotRequired[Nullable[str]] r"""Token the provider echoes back when verifying the URL (WhatsApp: the Verify token)""" event_type_path: NotRequired[Nullable[str]] event_type_pattern: NotRequired[Nullable[str]] event_id_pattern: NotRequired[Nullable[str]] + timestamp_pattern: NotRequired[Nullable[str]] class Webhook(BaseModel): @@ -93,6 +95,8 @@ class Webhook(BaseModel): updated_at: datetime + description: OptionalNullable[str] = UNSET + url_verification_token: OptionalNullable[str] = UNSET r"""Token the provider echoes back when verifying the URL (WhatsApp: the Verify token)""" @@ -107,6 +111,8 @@ class Webhook(BaseModel): event_id_pattern: OptionalNullable[str] = UNSET + timestamp_pattern: OptionalNullable[str] = UNSET + @model_serializer(mode="wrap") def _serialize_model_with_info(self, handler, info): return serialize_with_info(self.serialize_model, handler, info) @@ -114,14 +120,17 @@ def _serialize_model_with_info(self, handler, info): def serialize_model(self, handler): optional_fields = set( [ + "description", "url_verification_token", "event_type_path", "event_type_pattern", "event_id_pattern", + "timestamp_pattern", ] ) nullable_fields = set( [ + "description", "url_verified", "url_verification_token", "signature_hash_algorithm", @@ -135,6 +144,7 @@ def serialize_model(self, handler): "event_type_path", "event_type_pattern", "event_id_pattern", + "timestamp_pattern", "expires_at", ] ) diff --git a/src/mistralai/client/models/workflowexecutionrequest.py b/src/mistralai/client/models/workflowexecutionrequest.py index ac3b49005..949505af3 100644 --- a/src/mistralai/client/models/workflowexecutionrequest.py +++ b/src/mistralai/client/models/workflowexecutionrequest.py @@ -13,8 +13,18 @@ from mistralai.client.types.basemodel import current_filtered_dump import pydantic from pydantic import model_serializer -from typing import Any, Dict, Optional -from typing_extensions import Annotated, NotRequired, TypedDict +from typing import Any, Dict, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +WorkflowExecutionRequestCallContextTypedDict = TypeAliasType( + "WorkflowExecutionRequestCallContextTypedDict", Union[bool, int, str] +) + + +WorkflowExecutionRequestCallContext = TypeAliasType( + "WorkflowExecutionRequestCallContext", Union[bool, int, str] +) class WorkflowExecutionRequestTypedDict(TypedDict): @@ -33,6 +43,10 @@ class WorkflowExecutionRequestTypedDict(TypedDict): r"""W3C trace context to join this execution to the caller's trace. Ignored when force_new_trace is set.""" extensions: NotRequired[Nullable[Dict[str, Any]]] r"""Plugin-specific data to propagate into WorkflowContext.extensions at execution time.""" + call_context: NotRequired[ + Nullable[Dict[str, WorkflowExecutionRequestCallContextTypedDict]] + ] + r"""Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here.""" task_queue: NotRequired[Nullable[str]] r"""Deprecated. Use deployment_name instead.""" deployment_name: NotRequired[Nullable[str]] @@ -63,6 +77,11 @@ class WorkflowExecutionRequest(BaseModel): extensions: OptionalNullable[Dict[str, Any]] = UNSET r"""Plugin-specific data to propagate into WorkflowContext.extensions at execution time.""" + call_context: OptionalNullable[Dict[str, WorkflowExecutionRequestCallContext]] = ( + UNSET + ) + r"""Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here.""" + task_queue: Annotated[ OptionalNullable[str], pydantic.Field( @@ -89,6 +108,7 @@ def serialize_model(self, handler): "force_new_trace", "traceparent", "extensions", + "call_context", "task_queue", "deployment_name", ] @@ -101,6 +121,7 @@ def serialize_model(self, handler): "custom_tracing_attributes", "traceparent", "extensions", + "call_context", "task_queue", "deployment_name", ] diff --git a/src/mistralai/client/rag.py b/src/mistralai/client/rag.py index 6381adae8..085c50dbe 100644 --- a/src/mistralai/client/rag.py +++ b/src/mistralai/client/rag.py @@ -5,13 +5,11 @@ from mistralai.client.ingestion_pipeline_configurations import ( IngestionPipelineConfigurations, ) -from mistralai.client.rag_search_indexes import RagSearchIndexes from typing import Optional class Rag(BaseSDK): ingestion_pipeline_configurations: IngestionPipelineConfigurations - search_indexes: RagSearchIndexes def __init__( self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None @@ -24,6 +22,3 @@ def _init_sdks(self): self.ingestion_pipeline_configurations = IngestionPipelineConfigurations( self.sdk_configuration, parent_ref=self.parent_ref ) - self.search_indexes = RagSearchIndexes( - self.sdk_configuration, parent_ref=self.parent_ref - ) diff --git a/src/mistralai/client/rag_search_indexes.py b/src/mistralai/client/rag_search_indexes.py deleted file mode 100644 index 513d7c2c8..000000000 --- a/src/mistralai/client/rag_search_indexes.py +++ /dev/null @@ -1,789 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -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 Any, Mapping, Optional, Union - - -class RagSearchIndexes(BaseSDK): - def get_deployment_summaries( - self, - *, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.GetDeploymentSummariesResponse: - r"""Get Deployment Summaries - - Fetch all indexes available to a user - - :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 timeout_ms is None: - timeout_ms = 300000 - - 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/rag/deployments", - 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_deployment_summaries_v1_rag_deployments_get", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - tags=["beta.rag.search_indexes"], - extensions=None, - ), - request=req, - is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), - retry_config=retry_config, - ) - - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - models.GetDeploymentSummariesResponse, http_res - ) - if utils.match_response(http_res, ["400", "403", "404", "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, ["500", "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 get_deployment_summaries_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.GetDeploymentSummariesResponse: - r"""Get Deployment Summaries - - Fetch all indexes available to a user - - :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 timeout_ms is None: - timeout_ms = 300000 - - 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/rag/deployments", - 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_deployment_summaries_v1_rag_deployments_get", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - tags=["beta.rag.search_indexes"], - extensions=None, - ), - request=req, - is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), - retry_config=retry_config, - ) - - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - models.GetDeploymentSummariesResponse, http_res - ) - if utils.match_response(http_res, ["400", "403", "404", "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, ["500", "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) - - def register_deployment( - self, - *, - name: str, - deployment: Union[ - models.RegisterDeploymentRequestDeploymentDeployment, - models.RegisterDeploymentRequestDeploymentDeploymentTypedDict, - ], - status: Optional[models.RegisterDeploymentRequestDeploymentStatus] = "offline", - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.RegisterSearchIndexResponseIndex: - r"""Register (or re-register) a search index - - :param name: - :param deployment: - :param status: - :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 timeout_ms is None: - timeout_ms = 300000 - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.RegisterDeploymentRequestDeployment( - name=name, - status=status, - deployment=utils.get_pydantic_model( - deployment, models.RegisterDeploymentRequestDeploymentDeployment - ), - ) - - req = self._build_request( - method="PUT", - path="/v1/rag/deployments", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=True, - 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, - get_serialized_body=lambda: utils.serialize_request_body( - request, - False, - False, - "json", - models.RegisterDeploymentRequestDeployment, - ), - 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="register_deployment_v1_rag_deployments_put", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - tags=["beta.rag.search_indexes"], - extensions=None, - ), - request=req, - is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - models.RegisterSearchIndexResponseIndex, http_res - ) - if utils.match_response(http_res, "422", "application/json"): - response_data = unmarshal_json_response( - errors.HTTPValidationErrorData, http_res - ) - raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["400", "403", "404", "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, ["500", "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 register_deployment_async( - self, - *, - name: str, - deployment: Union[ - models.RegisterDeploymentRequestDeploymentDeployment, - models.RegisterDeploymentRequestDeploymentDeploymentTypedDict, - ], - status: Optional[models.RegisterDeploymentRequestDeploymentStatus] = "offline", - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.RegisterSearchIndexResponseIndex: - r"""Register (or re-register) a search index - - :param name: - :param deployment: - :param status: - :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 timeout_ms is None: - timeout_ms = 300000 - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.RegisterDeploymentRequestDeployment( - name=name, - status=status, - deployment=utils.get_pydantic_model( - deployment, models.RegisterDeploymentRequestDeploymentDeployment - ), - ) - - req = self._build_request_async( - method="PUT", - path="/v1/rag/deployments", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=True, - 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, - get_serialized_body=lambda: utils.serialize_request_body( - request, - False, - False, - "json", - models.RegisterDeploymentRequestDeployment, - ), - 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="register_deployment_v1_rag_deployments_put", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - tags=["beta.rag.search_indexes"], - extensions=None, - ), - request=req, - is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - models.RegisterSearchIndexResponseIndex, http_res - ) - if utils.match_response(http_res, "422", "application/json"): - response_data = unmarshal_json_response( - errors.HTTPValidationErrorData, http_res - ) - raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["400", "403", "404", "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, ["500", "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) - - def unregister_deployment( - self, - *, - deployment_id: str, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> Any: - r"""Unregister Deployment - - Delete all information about a deployment - - :param deployment_id: - :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 timeout_ms is None: - timeout_ms = 300000 - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.UnregisterDeploymentV1RagDeploymentsDeploymentIDDeleteRequest( - deployment_id=deployment_id, - ) - - req = self._build_request( - method="DELETE", - path="/v1/rag/deployments/{deployment_id}", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=False, - request_has_path_params=True, - 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="unregister_deployment_v1_rag_deployments__deployment_id__delete", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - tags=["beta.rag.search_indexes"], - extensions=None, - ), - request=req, - is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Any, http_res) - if utils.match_response(http_res, "422", "application/json"): - response_data = unmarshal_json_response( - errors.HTTPValidationErrorData, http_res - ) - raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["400", "403", "404", "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, ["500", "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 unregister_deployment_async( - self, - *, - deployment_id: str, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> Any: - r"""Unregister Deployment - - Delete all information about a deployment - - :param deployment_id: - :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 timeout_ms is None: - timeout_ms = 300000 - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.UnregisterDeploymentV1RagDeploymentsDeploymentIDDeleteRequest( - deployment_id=deployment_id, - ) - - req = self._build_request_async( - method="DELETE", - path="/v1/rag/deployments/{deployment_id}", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=False, - request_has_path_params=True, - 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="unregister_deployment_v1_rag_deployments__deployment_id__delete", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - tags=["beta.rag.search_indexes"], - extensions=None, - ), - request=req, - is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Any, http_res) - if utils.match_response(http_res, "422", "application/json"): - response_data = unmarshal_json_response( - errors.HTTPValidationErrorData, http_res - ) - raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["400", "403", "404", "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, ["500", "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) - - def update_index_metrics( - self, - *, - deployment_id: str, - request_body: Union[models.MetricsData, models.MetricsDataTypedDict], - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> Any: - r"""Update Index Metrics - - Update the metrics for a given index - - :param deployment_id: - :param request_body: - :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 timeout_ms is None: - timeout_ms = 300000 - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = ( - models.UpdateIndexMetricsV1RagDeploymentsDeploymentIDMetricsPutRequest( - deployment_id=deployment_id, - request_body=utils.get_pydantic_model(request_body, models.MetricsData), - ) - ) - - req = self._build_request( - method="PUT", - path="/v1/rag/deployments/{deployment_id}/metrics", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=True, - request_has_path_params=True, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, False, False, "json", models.MetricsData - ), - 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="update_index_metrics_v1_rag_deployments__deployment_id__metrics_put", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - tags=["beta.rag.search_indexes"], - extensions=None, - ), - request=req, - is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), - retry_config=retry_config, - ) - - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Any, http_res) - if utils.match_response(http_res, ["400", "403", "404", "422", "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, ["500", "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 update_index_metrics_async( - self, - *, - deployment_id: str, - request_body: Union[models.MetricsData, models.MetricsDataTypedDict], - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> Any: - r"""Update Index Metrics - - Update the metrics for a given index - - :param deployment_id: - :param request_body: - :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 timeout_ms is None: - timeout_ms = 300000 - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = ( - models.UpdateIndexMetricsV1RagDeploymentsDeploymentIDMetricsPutRequest( - deployment_id=deployment_id, - request_body=utils.get_pydantic_model(request_body, models.MetricsData), - ) - ) - - req = self._build_request_async( - method="PUT", - path="/v1/rag/deployments/{deployment_id}/metrics", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=True, - request_has_path_params=True, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request.request_body, False, False, "json", models.MetricsData - ), - 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="update_index_metrics_v1_rag_deployments__deployment_id__metrics_put", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - tags=["beta.rag.search_indexes"], - extensions=None, - ), - request=req, - is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), - retry_config=retry_config, - ) - - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Any, http_res) - if utils.match_response(http_res, ["400", "403", "404", "422", "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, ["500", "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/context_search_indexes.py b/src/mistralai/client/search_indexes.py similarity index 97% rename from src/mistralai/client/context_search_indexes.py rename to src/mistralai/client/search_indexes.py index 6ceeb7e0e..525e3cb39 100644 --- a/src/mistralai/client/context_search_indexes.py +++ b/src/mistralai/client/search_indexes.py @@ -10,7 +10,7 @@ from typing import Any, Awaitable, Dict, Iterable, List, Mapping, Optional, Union -class ContextSearchIndexes(BaseSDK): +class SearchIndexes(BaseSDK): def create( self, *, @@ -116,7 +116,7 @@ def create( if utils.match_response(http_res, ["403", "409", "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", "*"): + if utils.match_response(http_res, ["503", "5XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -227,7 +227,7 @@ async def create_async( if utils.match_response(http_res, ["403", "409", "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", "*"): + if utils.match_response(http_res, ["503", "5XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -368,10 +368,10 @@ def next_func() -> ( errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, "4XX", "*"): + if utils.match_response(http_res, ["403", "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", "*"): + if utils.match_response(http_res, ["503", "5XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -515,10 +515,10 @@ async def empty_result(): errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, "4XX", "*"): + if utils.match_response(http_res, ["403", "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", "*"): + if utils.match_response(http_res, ["503", "5XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -610,10 +610,10 @@ def get( errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["404", "4XX"], "*"): + if utils.match_response(http_res, ["403", "404", "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", "*"): + if utils.match_response(http_res, ["503", "5XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -705,10 +705,10 @@ async def get_async( errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["404", "4XX"], "*"): + if utils.match_response(http_res, ["403", "404", "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", "*"): + if utils.match_response(http_res, ["503", "5XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -806,10 +806,10 @@ def update( if utils.match_response(http_res, "202", "application/json"): return unmarshal_json_response(models.ManagedIndexResponse, http_res) - if utils.match_response(http_res, ["404", "409", "422", "4XX"], "*"): + if utils.match_response(http_res, ["403", "404", "409", "422", "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", "*"): + if utils.match_response(http_res, ["503", "5XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -907,10 +907,10 @@ async def update_async( if utils.match_response(http_res, "202", "application/json"): return unmarshal_json_response(models.ManagedIndexResponse, http_res) - if utils.match_response(http_res, ["404", "409", "422", "4XX"], "*"): + if utils.match_response(http_res, ["403", "404", "409", "422", "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", "*"): + if utils.match_response(http_res, ["503", "5XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -1002,10 +1002,10 @@ def delete( errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["404", "409", "4XX"], "*"): + if utils.match_response(http_res, ["403", "404", "409", "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", "*"): + if utils.match_response(http_res, ["503", "5XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -1097,10 +1097,10 @@ async def delete_async( errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["404", "409", "4XX"], "*"): + if utils.match_response(http_res, ["403", "404", "409", "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", "*"): + if utils.match_response(http_res, ["503", "5XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -1209,7 +1209,7 @@ def ingest_documents( if utils.match_response(http_res, ["403", "404", "409", "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", "*"): + if utils.match_response(http_res, ["503", "5XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -1318,7 +1318,7 @@ async def ingest_documents_async( if utils.match_response(http_res, ["403", "404", "409", "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", "*"): + if utils.match_response(http_res, ["503", "5XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -1424,10 +1424,10 @@ def delete_documents( errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["404", "409", "4XX"], "*"): + if utils.match_response(http_res, ["403", "404", "409", "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", "*"): + if utils.match_response(http_res, ["503", "5XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -1533,10 +1533,10 @@ async def delete_documents_async( errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["404", "409", "4XX"], "*"): + if utils.match_response(http_res, ["403", "404", "409", "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", "*"): + if utils.match_response(http_res, ["503", "5XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -1640,10 +1640,12 @@ def search( errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["400", "404", "409", "429", "4XX"], "*"): + if utils.match_response( + http_res, ["400", "402", "403", "404", "409", "429", "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, ["500", "5XX"], "*"): + if utils.match_response(http_res, ["500", "503", "5XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -1747,10 +1749,12 @@ async def search_async( errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["400", "404", "409", "429", "4XX"], "*"): + if utils.match_response( + http_res, ["400", "402", "403", "404", "409", "429", "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, ["500", "5XX"], "*"): + if utils.match_response(http_res, ["500", "503", "5XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -1867,10 +1871,10 @@ def navigate( errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["404", "409", "4XX"], "*"): + if utils.match_response(http_res, ["403", "404", "409", "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, ["500", "5XX"], "*"): + if utils.match_response(http_res, ["500", "503", "5XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -1987,10 +1991,10 @@ async def navigate_async( errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["404", "409", "4XX"], "*"): + if utils.match_response(http_res, ["403", "404", "409", "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, ["500", "5XX"], "*"): + if utils.match_response(http_res, ["500", "503", "5XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -2102,10 +2106,10 @@ def read( errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["404", "409", "4XX"], "*"): + if utils.match_response(http_res, ["403", "404", "409", "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, ["500", "5XX"], "*"): + if utils.match_response(http_res, ["500", "503", "5XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -2217,10 +2221,10 @@ async def read_async( errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["404", "409", "4XX"], "*"): + if utils.match_response(http_res, ["403", "404", "409", "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, ["500", "5XX"], "*"): + if utils.match_response(http_res, ["500", "503", "5XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -2332,10 +2336,10 @@ def grep( errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["404", "409", "4XX"], "*"): + if utils.match_response(http_res, ["403", "404", "409", "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, ["500", "5XX"], "*"): + if utils.match_response(http_res, ["500", "503", "5XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -2447,10 +2451,10 @@ async def grep_async( errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["404", "409", "4XX"], "*"): + if utils.match_response(http_res, ["403", "404", "409", "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, ["500", "5XX"], "*"): + if utils.match_response(http_res, ["500", "503", "5XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -2547,10 +2551,10 @@ def get_chunk( errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["404", "409", "4XX"], "*"): + if utils.match_response(http_res, ["403", "404", "409", "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, ["500", "5XX"], "*"): + if utils.match_response(http_res, ["500", "503", "5XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -2647,10 +2651,10 @@ async def get_chunk_async( errors.HTTPValidationErrorData, http_res ) raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, ["404", "409", "4XX"], "*"): + if utils.match_response(http_res, ["403", "404", "409", "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, ["500", "5XX"], "*"): + if utils.match_response(http_res, ["500", "503", "5XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -2748,7 +2752,7 @@ def get_index_summary( if utils.match_response(http_res, ["400", "403", "404", "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, ["500", "5XX"], "*"): + if utils.match_response(http_res, ["500", "503", "5XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -2846,7 +2850,7 @@ async def get_index_summary_async( if utils.match_response(http_res, ["400", "403", "404", "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, ["500", "5XX"], "*"): + if utils.match_response(http_res, ["500", "503", "5XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -2959,7 +2963,7 @@ def generate_index_summary( if utils.match_response(http_res, ["400", "403", "404", "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, ["500", "5XX"], "*"): + if utils.match_response(http_res, ["500", "503", "5XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -3073,7 +3077,7 @@ async def generate_index_summary_async( if utils.match_response(http_res, ["400", "403", "404", "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, ["500", "5XX"], "*"): + if utils.match_response(http_res, ["500", "503", "5XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -3190,7 +3194,7 @@ def set_index_summary( if utils.match_response(http_res, ["400", "403", "404", "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, ["500", "5XX"], "*"): + if utils.match_response(http_res, ["500", "503", "5XX"], "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -3306,7 +3310,7 @@ async def set_index_summary_async( if utils.match_response(http_res, ["400", "403", "404", "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, ["500", "5XX"], "*"): + if utils.match_response(http_res, ["500", "503", "5XX"], "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) diff --git a/src/mistralai/client/webhooks.py b/src/mistralai/client/webhooks.py index e68161151..e30e9f161 100644 --- a/src/mistralai/client/webhooks.py +++ b/src/mistralai/client/webhooks.py @@ -177,6 +177,7 @@ def create( provider: models.WebhookProvider, name: str, owner_type: Optional[models.TriggersOwnerType] = None, + description: OptionalNullable[str] = UNSET, secret: OptionalNullable[str] = UNSET, encryption_key: OptionalNullable[str] = UNSET, url_verification_token: OptionalNullable[str] = UNSET, @@ -188,6 +189,7 @@ def create( validity_period_second: OptionalNullable[int] = UNSET, signature_extractor_regex: OptionalNullable[str] = UNSET, timestamp_extractor_regex: OptionalNullable[str] = UNSET, + timestamp_pattern: OptionalNullable[str] = UNSET, signature_payload_pattern: OptionalNullable[str] = UNSET, signature_encoding: OptionalNullable[models.WebhookSignatureEncoding] = UNSET, success_status_code: OptionalNullable[int] = UNSET, @@ -203,6 +205,7 @@ def create( :param provider: :param name: Human-readable name for this webhook :param owner_type: + :param description: What this webhook is used for :param secret: Signing secret provided by the third-party provider :param encryption_key: Encryption key used to decrypt webhook payloads :param url_verification_token: Token the provider echoes back when verifying the URL. Required for WhatsApp (paste the same value in the Verify token field of the Meta App Dashboard), forbidden for other providers @@ -211,10 +214,11 @@ def create( :param signature_header_name: :param validity_period_second: Maximum allowed drift in seconds between the signed timestamp and reception time, eg 300 :param signature_extractor_regex: Regex to extract signature, eg sha256=(.*) - :param timestamp_extractor_regex: Regex to extract the timestamp from the signature header, used as {timestamp}, eg t=([^,]+) + :param timestamp_extractor_regex: Regex to extract the timestamp from the rendered timestamp_pattern (the signature header by default), used as {timestamp}, eg t=([^,]+). Defaults to the whole value when timestamp_pattern is set + :param timestamp_pattern: Pattern for the timestamp used as {timestamp}, with {body.} and {headers.} placeholders, eg {headers.X-Slack-Request-Timestamp} or {body.webhookTimestamp}. Defaults to the signature header when timestamp_extractor_regex is set :param signature_payload_pattern: Pattern for signature payload, eg {body} or {timestamp}.{body} :param signature_encoding: - :param success_status_code: + :param success_status_code: HTTP status code returned for accepted deliveries, eg 200 :param event_type_pattern: Pattern for the event type, with {body.} and {headers.} placeholders, eg {body.type} or {headers.X-GitHub-Event} :param event_id_pattern: Pattern for a unique event identifier used to deduplicate deliveries, with {body.} and {headers.} placeholders, eg {body.id} or {body.event_id}.{headers.X-Delivery-Id}. Defaults to a hash of the request body :param retries: Override the default retry configuration for this method @@ -239,6 +243,7 @@ def create( provider=provider, owner_type=owner_type, name=name, + description=description, secret=secret, encryption_key=encryption_key, url_verification_token=url_verification_token, @@ -248,6 +253,7 @@ def create( validity_period_second=validity_period_second, signature_extractor_regex=signature_extractor_regex, timestamp_extractor_regex=timestamp_extractor_regex, + timestamp_pattern=timestamp_pattern, signature_payload_pattern=signature_payload_pattern, signature_encoding=signature_encoding, success_status_code=success_status_code, @@ -323,6 +329,7 @@ async def create_async( provider: models.WebhookProvider, name: str, owner_type: Optional[models.TriggersOwnerType] = None, + description: OptionalNullable[str] = UNSET, secret: OptionalNullable[str] = UNSET, encryption_key: OptionalNullable[str] = UNSET, url_verification_token: OptionalNullable[str] = UNSET, @@ -334,6 +341,7 @@ async def create_async( validity_period_second: OptionalNullable[int] = UNSET, signature_extractor_regex: OptionalNullable[str] = UNSET, timestamp_extractor_regex: OptionalNullable[str] = UNSET, + timestamp_pattern: OptionalNullable[str] = UNSET, signature_payload_pattern: OptionalNullable[str] = UNSET, signature_encoding: OptionalNullable[models.WebhookSignatureEncoding] = UNSET, success_status_code: OptionalNullable[int] = UNSET, @@ -349,6 +357,7 @@ async def create_async( :param provider: :param name: Human-readable name for this webhook :param owner_type: + :param description: What this webhook is used for :param secret: Signing secret provided by the third-party provider :param encryption_key: Encryption key used to decrypt webhook payloads :param url_verification_token: Token the provider echoes back when verifying the URL. Required for WhatsApp (paste the same value in the Verify token field of the Meta App Dashboard), forbidden for other providers @@ -357,10 +366,11 @@ async def create_async( :param signature_header_name: :param validity_period_second: Maximum allowed drift in seconds between the signed timestamp and reception time, eg 300 :param signature_extractor_regex: Regex to extract signature, eg sha256=(.*) - :param timestamp_extractor_regex: Regex to extract the timestamp from the signature header, used as {timestamp}, eg t=([^,]+) + :param timestamp_extractor_regex: Regex to extract the timestamp from the rendered timestamp_pattern (the signature header by default), used as {timestamp}, eg t=([^,]+). Defaults to the whole value when timestamp_pattern is set + :param timestamp_pattern: Pattern for the timestamp used as {timestamp}, with {body.} and {headers.} placeholders, eg {headers.X-Slack-Request-Timestamp} or {body.webhookTimestamp}. Defaults to the signature header when timestamp_extractor_regex is set :param signature_payload_pattern: Pattern for signature payload, eg {body} or {timestamp}.{body} :param signature_encoding: - :param success_status_code: + :param success_status_code: HTTP status code returned for accepted deliveries, eg 200 :param event_type_pattern: Pattern for the event type, with {body.} and {headers.} placeholders, eg {body.type} or {headers.X-GitHub-Event} :param event_id_pattern: Pattern for a unique event identifier used to deduplicate deliveries, with {body.} and {headers.} placeholders, eg {body.id} or {body.event_id}.{headers.X-Delivery-Id}. Defaults to a hash of the request body :param retries: Override the default retry configuration for this method @@ -385,6 +395,7 @@ async def create_async( provider=provider, owner_type=owner_type, name=name, + description=description, secret=secret, encryption_key=encryption_key, url_verification_token=url_verification_token, @@ -394,6 +405,7 @@ async def create_async( validity_period_second=validity_period_second, signature_extractor_regex=signature_extractor_regex, timestamp_extractor_regex=timestamp_extractor_regex, + timestamp_pattern=timestamp_pattern, signature_payload_pattern=signature_payload_pattern, signature_encoding=signature_encoding, success_status_code=success_status_code, diff --git a/src/mistralai/client/workflows.py b/src/mistralai/client/workflows.py index af7d9b3ce..dfa4ab942 100644 --- a/src/mistralai/client/workflows.py +++ b/src/mistralai/client/workflows.py @@ -922,6 +922,12 @@ def execute_workflow( force_new_trace: Optional[bool] = False, traceparent: OptionalNullable[str] = UNSET, extensions: OptionalNullable[Mapping[str, Any]] = UNSET, + call_context: OptionalNullable[ + Union[ + Mapping[str, models.WorkflowExecutionRequestCallContext], + Mapping[str, models.WorkflowExecutionRequestCallContextTypedDict], + ] + ] = UNSET, task_queue: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -940,6 +946,7 @@ def execute_workflow( :param force_new_trace: If true, ignore the caller's trace context and start a new, independent trace for this execution instead of joining the caller's trace. :param traceparent: W3C trace context to join this execution to the caller's trace. Ignored when force_new_trace is set. :param extensions: Plugin-specific data to propagate into WorkflowContext.extensions at execution time. + :param call_context: Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here. :param task_queue: Deprecated. Use deployment_name instead. :param deployment_name: Name of the deployment to route this execution to :param retries: Override the default retry configuration for this method @@ -975,6 +982,12 @@ def execute_workflow( extensions=utils.unmarshal( extensions, OptionalNullable[Dict[str, Any]] ), + call_context=utils.unmarshal( + call_context, + OptionalNullable[ + Dict[str, models.WorkflowExecutionRequestCallContext] + ], + ), task_queue=task_queue, deployment_name=deployment_name, ), @@ -1061,6 +1074,12 @@ async def execute_workflow_async( force_new_trace: Optional[bool] = False, traceparent: OptionalNullable[str] = UNSET, extensions: OptionalNullable[Mapping[str, Any]] = UNSET, + call_context: OptionalNullable[ + Union[ + Mapping[str, models.WorkflowExecutionRequestCallContext], + Mapping[str, models.WorkflowExecutionRequestCallContextTypedDict], + ] + ] = UNSET, task_queue: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1079,6 +1098,7 @@ async def execute_workflow_async( :param force_new_trace: If true, ignore the caller's trace context and start a new, independent trace for this execution instead of joining the caller's trace. :param traceparent: W3C trace context to join this execution to the caller's trace. Ignored when force_new_trace is set. :param extensions: Plugin-specific data to propagate into WorkflowContext.extensions at execution time. + :param call_context: Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here. :param task_queue: Deprecated. Use deployment_name instead. :param deployment_name: Name of the deployment to route this execution to :param retries: Override the default retry configuration for this method @@ -1114,6 +1134,12 @@ async def execute_workflow_async( extensions=utils.unmarshal( extensions, OptionalNullable[Dict[str, Any]] ), + call_context=utils.unmarshal( + call_context, + OptionalNullable[ + Dict[str, models.WorkflowExecutionRequestCallContext] + ], + ), task_queue=task_queue, deployment_name=deployment_name, ), @@ -1203,6 +1229,12 @@ def execute_workflow_registration( force_new_trace: Optional[bool] = False, traceparent: OptionalNullable[str] = UNSET, extensions: OptionalNullable[Mapping[str, Any]] = UNSET, + call_context: OptionalNullable[ + Union[ + Mapping[str, models.WorkflowExecutionRequestCallContext], + Mapping[str, models.WorkflowExecutionRequestCallContextTypedDict], + ] + ] = UNSET, task_queue: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1221,6 +1253,7 @@ def execute_workflow_registration( :param force_new_trace: If true, ignore the caller's trace context and start a new, independent trace for this execution instead of joining the caller's trace. :param traceparent: W3C trace context to join this execution to the caller's trace. Ignored when force_new_trace is set. :param extensions: Plugin-specific data to propagate into WorkflowContext.extensions at execution time. + :param call_context: Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here. :param task_queue: Deprecated. Use deployment_name instead. :param deployment_name: Name of the deployment to route this execution to :param retries: Override the default retry configuration for this method @@ -1256,6 +1289,12 @@ def execute_workflow_registration( extensions=utils.unmarshal( extensions, OptionalNullable[Dict[str, Any]] ), + call_context=utils.unmarshal( + call_context, + OptionalNullable[ + Dict[str, models.WorkflowExecutionRequestCallContext] + ], + ), task_queue=task_queue, deployment_name=deployment_name, ), @@ -1345,6 +1384,12 @@ async def execute_workflow_registration_async( force_new_trace: Optional[bool] = False, traceparent: OptionalNullable[str] = UNSET, extensions: OptionalNullable[Mapping[str, Any]] = UNSET, + call_context: OptionalNullable[ + Union[ + Mapping[str, models.WorkflowExecutionRequestCallContext], + Mapping[str, models.WorkflowExecutionRequestCallContextTypedDict], + ] + ] = UNSET, task_queue: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1363,6 +1408,7 @@ async def execute_workflow_registration_async( :param force_new_trace: If true, ignore the caller's trace context and start a new, independent trace for this execution instead of joining the caller's trace. :param traceparent: W3C trace context to join this execution to the caller's trace. Ignored when force_new_trace is set. :param extensions: Plugin-specific data to propagate into WorkflowContext.extensions at execution time. + :param call_context: Cleartext technical values (ids, flags) for the code this call runs, read with `get_call_context()`. Not covered by payload encryption: never put customer content here. :param task_queue: Deprecated. Use deployment_name instead. :param deployment_name: Name of the deployment to route this execution to :param retries: Override the default retry configuration for this method @@ -1398,6 +1444,12 @@ async def execute_workflow_registration_async( extensions=utils.unmarshal( extensions, OptionalNullable[Dict[str, Any]] ), + call_context=utils.unmarshal( + call_context, + OptionalNullable[ + Dict[str, models.WorkflowExecutionRequestCallContext] + ], + ), task_queue=task_queue, deployment_name=deployment_name, ), diff --git a/src/mistralai/extra/batch/client.py b/src/mistralai/extra/batch/client.py index 7dba889ae..e7d8d1291 100644 --- a/src/mistralai/extra/batch/client.py +++ b/src/mistralai/extra/batch/client.py @@ -70,8 +70,12 @@ BatchRequest, File, ) -from mistralai.client.types import BaseModel, OptionalNullable -from mistralai.client.utils import stream_to_bytes_async +from mistralai.client.types import UNSET, BaseModel, OptionalNullable +from mistralai.client.utils import ( + BackoffStrategy, + RetryConfig, + stream_to_bytes_async, +) if TYPE_CHECKING: from mistralai.client.sdk import Mistral @@ -502,6 +506,16 @@ def ordered(self, custom_ids: Sequence[str]) -> list[RespBodyT]: return _ordered(self.by_id(), errors_by_id, custom_ids) +# How ``wait`` retries one failed status poll when the client sets no retry_config: +# the SDK's own backoff (429/5xx and connection errors), 1 s doubling to 1 min, and +# for at most 15 min (never past the wait's deadline) before the error is raised. +_POLL_RETRY_INITIAL_INTERVAL_MS = 1_000 +_POLL_RETRY_MAX_INTERVAL_MS = 60_000 +_POLL_RETRY_EXPONENT = 2.0 +_POLL_RETRY_MAX_ELAPSED_MS = 15 * 60_000 +_POLL_RETRY_JITTER_MS = 1_000 + + # --------------------------------------------------------------------------- # Client: lifecycle primitives + run() convenience # --------------------------------------------------------------------------- @@ -661,12 +675,18 @@ async def wait( ) -> "BatchJobHandle[RespBodyT]": """Poll until the job reaches a terminal state, returning the terminal handle. Pass ``deadline`` (a ``time.monotonic()`` value) to enforce a wall-clock cap - shared across several calls; otherwise it is derived from ``timeout_hours``.""" + shared across several calls; otherwise it is derived from ``timeout_hours``. + + A poll that meets a transient failure (429, 5xx, connection error or + timeout) is retried with backoff for up to 15 minutes, within the deadline + (``TimeoutError`` once the deadline passes mid-retry), + unless the ``Mistral`` client has its own ``retry_config``, which then + applies instead. Other errors (e.g. 404) are raised at once.""" job_id = self._job_id(handle) if deadline is None: deadline = time.monotonic() + timeout_hours * 3600 while True: - current = await self.get(job_id, http_headers=http_headers) + current = await self._poll(job_id, deadline, http_headers) if is_terminal(current.status): return current remaining = deadline - time.monotonic() @@ -773,6 +793,7 @@ async def run( poll_interval_seconds: float = 30.0, max_failed_job_retries: int = 0, inline_threshold: int = 1000, + cleanup_result_files: bool = False, http_headers: Optional[Mapping[str, str]] = None, ) -> BatchResult[RespBodyT]: """Run a batch end to end, blocking until the job reaches a terminal state, @@ -797,10 +818,16 @@ async def run( transactional (wait for the whole thing, retry the whole thing), which cannot be expressed once results have been streamed out incrementally. - Cleans up the server-side files it creates: the input file it uploaded (a - caller-supplied ``BatchInputFile`` is left alone) and every attempt's - output/error files, whose bytes are already materialized into the result. If - the job is still running when ``run`` aborts (timeout, or the coroutine is + Deletes the input file it uploaded, since that one is its own temporary + artifact (a caller-supplied ``BatchInputFile`` is left alone). The job's + output/error files are KEPT: their bytes are materialized into the result, but + ``result.job.output_file`` still names them, the console still lists them, and + a caller that crashes before persisting the result would otherwise lose the + only copy of output it has already paid for. Pass + ``cleanup_result_files=True`` to delete them as well, accepting that the file + ids on the returned job then refer to files that no longer exist. + + If the job is still running when ``run`` aborts (timeout, or the coroutine is cancelled), it best-effort ``cancel``s it so it doesn't keep billing. For a decomposed lifecycle (Temporal activity polled by a retry policy, or @@ -863,14 +890,53 @@ async def run( if created_input is not None: await self._delete_quietly(created_input, http_headers) raise - # Success: the result files are materialized into ``result`` (superseded - # attempts' files are discarded orphans), so the server copies -- and the input - # file run() uploaded -- are now safe to delete. - await self._delete_files_quietly([*result_files, created_input], http_headers) + to_delete: list[Optional[ResourceID]] = [created_input] + if cleanup_result_files: + to_delete += result_files + await self._delete_files_quietly(to_delete, http_headers) return result # -- internals ---------------------------------------------------------- + async def _poll( + self, + job_id: str, + deadline: float, + http_headers: Optional[Mapping[str, str]], + ) -> "BatchJobHandle[RespBodyT]": + """One status poll for ``wait``. A long wait makes thousands of them, so a + transient failure is retried rather than ending the wait; a retry config + set on the client wins.""" + kwargs = self._headers_kwarg(http_headers) + remaining_ms = int((deadline - time.monotonic()) * 1000) + budget_ms = min(_POLL_RETRY_MAX_ELAPSED_MS, remaining_ms) + if self._client.sdk_configuration.retry_config is not UNSET or budget_ms <= 0: + job = await self._client.batch.jobs.get_async( + job_id=cast(Any, job_id), **kwargs + ) + return BatchJobHandle(job) + kwargs["retries"] = RetryConfig( + "backoff", + BackoffStrategy( + initial_interval=_POLL_RETRY_INITIAL_INTERVAL_MS, + max_interval=_POLL_RETRY_MAX_INTERVAL_MS, + exponent=_POLL_RETRY_EXPONENT, + max_elapsed_time=budget_ms, + jitter_ms=_POLL_RETRY_JITTER_MS, + ), + retry_connection_errors=True, + ) + try: + # The backoff sleeps a server's Retry-After as given, which could + # carry the poll past the wait's deadline: hold it to the deadline. + job = await asyncio.wait_for( + self._client.batch.jobs.get_async(job_id=cast(Any, job_id), **kwargs), + timeout=remaining_ms / 1000, + ) + except asyncio.TimeoutError as exc: + raise TimeoutError(f"Batch job {job_id} timed out while polling") from exc + return BatchJobHandle(job) + @staticmethod def _headers_kwarg( http_headers: Optional[Mapping[str, str]], diff --git a/src/mistralai/extra/realtime/speech.py b/src/mistralai/extra/realtime/speech.py index 7aa90b22e..db24f3a7f 100644 --- a/src/mistralai/extra/realtime/speech.py +++ b/src/mistralai/extra/realtime/speech.py @@ -6,7 +6,7 @@ import time from asyncio import CancelledError from collections import deque -from typing import Any, AsyncIterator, Deque, Mapping, Optional, Union +from typing import Any, AsyncIterator, Deque, Dict, List, Mapping, Optional, Union from urllib.parse import parse_qsl, urlencode, urlparse, urlunparse try: @@ -29,6 +29,7 @@ read_service_account_token, ) from mistralai.client.models import ( + IPAPhoneme, RealtimeSpeechError, RealtimeSpeechInputTextAppend, RealtimeSpeechInputTextEnd, @@ -160,6 +161,7 @@ async def update_session( response_format: Optional[SpeechOutputFormat] = None, streaming_mode: Optional[RealtimeSpeechStreamingMode] = None, expressiveness: Optional[float] = None, + phoneme_hints: Optional[Dict[str, List[IPAPhoneme]]] = None, ) -> None: if self._closed: raise RuntimeError("Connection is closed") @@ -170,6 +172,7 @@ async def update_session( "response_format": response_format, "streaming_mode": streaming_mode, "expressiveness": expressiveness, + "phoneme_hints": phoneme_hints, } fields = {name: value for name, value in fields.items() if value is not None} if not fields: @@ -256,6 +259,7 @@ async def connect( response_format: Optional[SpeechOutputFormat] = None, streaming_mode: Optional[RealtimeSpeechStreamingMode] = None, expressiveness: Optional[float] = None, + phoneme_hints: Optional[Dict[str, List[IPAPhoneme]]] = None, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, @@ -325,6 +329,7 @@ async def connect( response_format, streaming_mode, expressiveness, + phoneme_hints, ) if any(value is not None for value in session_fields): await connection.update_session( @@ -333,6 +338,7 @@ async def connect( response_format=response_format, streaming_mode=streaming_mode, expressiveness=expressiveness, + phoneme_hints=phoneme_hints, ) return connection @@ -356,6 +362,7 @@ async def speak_stream( response_format: Optional[SpeechOutputFormat] = None, streaming_mode: Optional[RealtimeSpeechStreamingMode] = None, expressiveness: Optional[float] = None, + phoneme_hints: Optional[Dict[str, List[IPAPhoneme]]] = None, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, @@ -367,6 +374,7 @@ async def speak_stream( response_format=response_format, streaming_mode=streaming_mode, expressiveness=expressiveness, + phoneme_hints=phoneme_hints, server_url=server_url, timeout_ms=timeout_ms, http_headers=http_headers, diff --git a/src/mistralai/extra/tests/test_batch.py b/src/mistralai/extra/tests/test_batch.py index b4d0c6e92..0d1f715c9 100644 --- a/src/mistralai/extra/tests/test_batch.py +++ b/src/mistralai/extra/tests/test_batch.py @@ -1,10 +1,13 @@ import asyncio import json +import time from typing import Any, Optional, Sequence, cast from uuid import UUID +import httpx2 as httpx import pytest +from mistralai.client import Mistral, errors from mistralai.client.models import ( BatchJob, BatchJobStatus, @@ -12,6 +15,9 @@ EmbeddingRequest, EmbeddingResponse, ) +from mistralai.client.types import UNSET +from mistralai.client.utils import BackoffStrategy, RetryConfig +from mistralai.extra.batch import client as batch_client_module from mistralai.extra.batch import ( RUNNING_STATUSES, BatchClient, @@ -151,6 +157,7 @@ class _FakeClient: def __init__(self, files, jobs): self.files = files self.batch = type("Batch", (), {"jobs": jobs})() + self.sdk_configuration = type("Config", (), {"retry_config": UNSET})() def _embed_client(files, jobs): @@ -584,6 +591,117 @@ async def test_wait_raises_timeout(): await client.wait(handle, poll_interval_seconds=0, timeout_hours=0) +def _job_json(status: BatchJobStatus) -> dict[str, Any]: + return _make_job(status=status).model_dump(mode="json", by_alias=True) + + +def _http_batch_client( + answers: list[Any], seen: list[str], **mistral_kwargs: Any +) -> BatchClient: + """A BatchClient over a real ``Mistral`` whose transport plays ``answers`` in + order: an int is a bare error status, a ``(status, headers)`` tuple an error + with headers, an exception is raised as a transport + failure, a status string is a 200 with that job state.""" + + def handler(request: httpx.Request) -> httpx.Response: + seen.append(request.url.path) + answer = answers.pop(0) + if isinstance(answer, Exception): + raise answer + if isinstance(answer, int): + return httpx.Response(answer, json={"detail": "boom"}) + if isinstance(answer, tuple): + code, headers = answer + return httpx.Response(code, headers=headers, json={"detail": "boom"}) + return httpx.Response(200, json=_job_json(answer)) + + mistral = Mistral( + api_key="test", + async_client=httpx.AsyncClient(transport=httpx.MockTransport(handler)), + **mistral_kwargs, + ) + return BatchClient( + mistral, endpoint="/v1/embeddings", response_body_type=EmbeddingResponse + ) + + +@pytest.fixture +def fast_poll_retries(monkeypatch): + monkeypatch.setattr(batch_client_module, "_POLL_RETRY_INITIAL_INTERVAL_MS", 1) + monkeypatch.setattr(batch_client_module, "_POLL_RETRY_MAX_INTERVAL_MS", 1) + monkeypatch.setattr(batch_client_module, "_POLL_RETRY_JITTER_MS", 0) + + +@pytest.mark.asyncio +async def test_wait_survives_transient_poll_failures(fast_poll_retries): + # One 5xx or dropped connection among thousands of polls must not end a + # multi-hour wait (mistralai/client-python#625). + seen: list[str] = [] + client = _http_batch_client( + [503, httpx.ConnectError("reset"), "RUNNING", 502, 504, 429, "SUCCESS"], seen + ) + terminal = await client.wait(str(JOB_ID), poll_interval_seconds=0) + assert terminal.status == "SUCCESS" + assert len(seen) == 7 + + +@pytest.mark.asyncio +async def test_wait_raises_client_errors_at_once(fast_poll_retries): + seen: list[str] = [] + client = _http_batch_client([404, "SUCCESS"], seen) + with pytest.raises(errors.SDKError): + await client.wait(str(JOB_ID), poll_interval_seconds=0) + assert len(seen) == 1 + + +@pytest.mark.asyncio +async def test_wait_gives_up_when_a_poll_keeps_failing(monkeypatch, fast_poll_retries): + monkeypatch.setattr(batch_client_module, "_POLL_RETRY_MAX_ELAPSED_MS", 50) + seen: list[str] = [] + client = _http_batch_client([503] * 1000, seen) + with pytest.raises(errors.SDKError): + await client.wait(str(JOB_ID), poll_interval_seconds=0) + assert 1 < len(seen) < 1000 + + +@pytest.mark.asyncio +async def test_wait_retry_after_cannot_outlast_the_deadline(fast_poll_retries): + # The backoff sleeps a Retry-After as given: an hour-long one must not hold + # the wait an hour past its deadline. + seen: list[str] = [] + client = _http_batch_client([(503, {"Retry-After": "3600"}), "SUCCESS"], seen) + started = time.monotonic() + with pytest.raises(TimeoutError): + await client.wait( + str(JOB_ID), poll_interval_seconds=0, deadline=time.monotonic() + 0.2 + ) + assert time.monotonic() - started < 5 + assert len(seen) == 1 + + +@pytest.mark.asyncio +async def test_wait_keeps_the_callers_retry_config(fast_poll_retries): + seen: list[str] = [] + client = _http_batch_client( + [503, "SUCCESS"], + seen, + retry_config=RetryConfig("none", BackoffStrategy(1, 1, 1, 1), False), + ) + with pytest.raises(errors.SDKError): + await client.wait(str(JOB_ID), poll_interval_seconds=0) + assert len(seen) == 1 + + +@pytest.mark.asyncio +async def test_get_does_not_retry_on_its_own(fast_poll_retries): + # get() stays single-shot, for drivers (Temporal, cron) that own the cadence. + seen: list[str] = [] + client = _http_batch_client([503, "SUCCESS"], seen) + with pytest.raises(errors.SDKError): + await client.get(str(JOB_ID)) + assert len(seen) == 1 + + # --------------------------------------------------------------------------- # stream_results() — one-pass, line by line # --------------------------------------------------------------------------- @@ -920,7 +1038,7 @@ async def test_run_download_uses_http_headers(): @pytest.mark.asyncio -async def test_run_deletes_input_it_uploaded_and_result_files(): +async def test_run_deletes_input_it_uploaded_but_keeps_result_files(): files = _FakeFiles(downloads={str(FILE_OUT_ID): [_ok_line("a").encode()]}) jobs = _FakeJobs([_make_job()], poll_statuses=["SUCCESS"]) client = _embed_client(files, jobs) @@ -930,12 +1048,11 @@ async def test_run_deletes_input_it_uploaded_and_result_files(): poll_interval_seconds=0, ) deleted = {c[1]["file_id"] for c in files.calls if c[0] == "delete"} - # the input file run() uploaded + the job's output file are all cleaned up - assert deleted == {str(FILE_UPLOADED_ID), str(FILE_OUT_ID)} + assert deleted == {str(FILE_UPLOADED_ID)} @pytest.mark.asyncio -async def test_run_deletes_output_and_error_files(): +async def test_run_keeps_result_files_by_default(): files = _FakeFiles( downloads={ str(FILE_OUT_ID): [b""], @@ -944,11 +1061,30 @@ async def test_run_deletes_output_and_error_files(): ) jobs = _FakeJobs([_make_job(failed=1, succeeded=0)], poll_statuses=["SUCCESS"]) client = _embed_client(files, jobs) - await client.run( + result = await client.run( BatchInput.from_payload({"a": _embed_req()}), poll_interval_seconds=0 ) + assert not any(c[0] == "delete" for c in files.calls) + assert result.job.output_file == str(FILE_OUT_ID) + assert result.job.error_file == str(FILE_ERROR_ID) + + +@pytest.mark.asyncio +async def test_run_deletes_result_files_when_asked(): + files = _FakeFiles( + downloads={ + str(FILE_OUT_ID): [b""], + str(FILE_ERROR_ID): [_err_line("b").encode()], + } + ) + jobs = _FakeJobs([_make_job(failed=1, succeeded=0)], poll_statuses=["SUCCESS"]) + client = _embed_client(files, jobs) + await client.run( + BatchInput.from_payload({"a": _embed_req()}), + poll_interval_seconds=0, + cleanup_result_files=True, + ) deleted = {c[1]["file_id"] for c in files.calls if c[0] == "delete"} - # inline input (nothing uploaded); both result files cleaned up assert deleted == {str(FILE_OUT_ID), str(FILE_ERROR_ID)} @@ -957,7 +1093,11 @@ async def test_run_does_not_delete_caller_supplied_input_file(): files = _FakeFiles(downloads={str(FILE_OUT_ID): [_ok_line("a").encode()]}) jobs = _FakeJobs([_make_job()], poll_statuses=["SUCCESS"]) client = _embed_client(files, jobs) - await client.run(BatchInputFile(FILE_PREEXISTING_ID), poll_interval_seconds=0) + await client.run( + BatchInputFile(FILE_PREEXISTING_ID), + poll_interval_seconds=0, + cleanup_result_files=True, + ) deleted = {c[1]["file_id"] for c in files.calls if c[0] == "delete"} assert str(FILE_PREEXISTING_ID) not in deleted # the caller owns their input file assert str(FILE_OUT_ID) in deleted @@ -969,7 +1109,8 @@ async def test_run_delete_uses_http_headers(): jobs = _FakeJobs([_make_job()], poll_statuses=["SUCCESS"]) client = _embed_client(files, jobs) await client.run( - BatchInput.from_payload({"a": _embed_req()}), + BatchInput.from_payload({"a": _embed_req(), "b": _embed_req()}), + inline_threshold=1, poll_interval_seconds=0, http_headers={"x": "y"}, ) diff --git a/src/mistralai/extra/tests/test_realtime_speech.py b/src/mistralai/extra/tests/test_realtime_speech.py index 9a8b2b23e..ad2e735d7 100644 --- a/src/mistralai/extra/tests/test_realtime_speech.py +++ b/src/mistralai/extra/tests/test_realtime_speech.py @@ -168,6 +168,28 @@ async def test_update_session_sends_set_fields(self) -> None: ], ) + async def test_update_session_sends_phoneme_hints(self) -> None: + ws = FakeWebSocket() + await _connection(ws).update_session(phoneme_hints={"Dab": ["d", "a", "b"]}) + self.assertEqual( + ws.sent, + [ + { + "type": "session.update", + "session": {"phoneme_hints": {"Dab": ["d", "a", "b"]}}, + } + ], + ) + + async def test_update_session_clears_phoneme_hints_with_empty_mapping( + self, + ) -> None: + ws = FakeWebSocket() + await _connection(ws).update_session(phoneme_hints={}) + self.assertEqual( + ws.sent, [{"type": "session.update", "session": {"phoneme_hints": {}}}] + ) + async def test_rejects_empty_update(self) -> None: ws = FakeWebSocket() with self.assertRaisesRegex(ValueError, "At least one session field"): @@ -221,6 +243,20 @@ async def test_connect_url_and_session_update(self) -> None: ) self.assertEqual(connection.request_id, "ws-123") + async def test_connect_sends_phoneme_hints(self) -> None: + ws = FakeWebSocket([SESSION_CREATED]) + with self._patch(ws): + await self._client().connect(MODEL, phoneme_hints={"Dab": ["d", "a", "b"]}) + self.assertEqual( + ws.sent, + [ + { + "type": "session.update", + "session": {"phoneme_hints": {"Dab": ["d", "a", "b"]}}, + } + ], + ) + async def test_connect_sends_nothing_without_session_fields(self) -> None: ws = FakeWebSocket([SESSION_CREATED]) with self._patch(ws): diff --git a/src/mistralai/extra/tests/test_stream_error_hook.py b/src/mistralai/extra/tests/test_stream_error_hook.py index 6ee7b3974..94ba4c368 100644 --- a/src/mistralai/extra/tests/test_stream_error_hook.py +++ b/src/mistralai/extra/tests/test_stream_error_hook.py @@ -1,3 +1,7 @@ +import asyncio +import base64 +import json + import httpx2 as httpx import pytest from httpx2._types import AsyncByteStream, SyncByteStream @@ -15,6 +19,8 @@ PayloadEncryptionMode, WorkflowEncodingConfig, ) +from mistralai.extra.workflows.encoding.models import EncodedPayloadOptions +from mistralai.extra.workflows.encoding.payload_encoder import PayloadEncoder from mistralai.client._hooks.stream_error_hook import ( STREAM_OPERATIONS_WITH_ERROR_EVENT, WorkflowStreamErrorHook, @@ -259,3 +265,75 @@ def test_hook_ignores_non_stream_operations(): # Response is returned untouched: same object, original stream not wrapped. assert result is response assert response.stream is source + + +@pytest.mark.asyncio +async def test_encoding_hook_decrypts_stream_on_the_callers_event_loop(monkeypatch): + # PRIM-2306: each SSE line used to be decrypted on a new thread with a new + # event loop while the caller's loop stayed blocked. + encryption_config = WorkflowEncodingConfig( + payload_encryption=PayloadEncryptionConfig( + mode=PayloadEncryptionMode.FULL, main_key=SecretStr("0" * 64) + ) + ) + client = Mistral(api_key="test-key") + configure_workflow_encoding( + encryption_config, namespace="demo", sdk_config=client.sdk_configuration + ) + encoder = PayloadEncoder(encoding_config=encryption_config) + frames = [] + for n in range(3): + encoded, options = await encoder.encode_event_payload_content( + json.dumps({"n": n}).encode() + ) + assert EncodedPayloadOptions.ENCRYPTED in options + event = { + "data": { + "attributes": { + "output": { + "type": "json", + "value": base64.b64encode(encoded).decode(), + "encoding_options": [option.value for option in options], + } + } + } + } + frames.append(f"event: workflow.event\ndata: {json.dumps(event)}\n\n".encode()) + + decoding_loops = [] + decode_event_payload = PayloadEncoder.decode_event_payload + + async def recording_decode_event_payload(self, payload_data): + decoding_loops.append(asyncio.get_running_loop()) + return await decode_event_payload(self, payload_data) + + monkeypatch.setattr( + PayloadEncoder, "decode_event_payload", recording_decode_event_payload + ) + + ctx = AfterSuccessContext( + HookContext( + config=client.sdk_configuration, + base_url="https://api.example.com", + operation_id=STREAM_OPERATION_ID, + oauth2_scopes=[], + security_source=None, + tags=None, + extensions=None, + ) + ) + response = WorkflowEncodingHook().after_success( + ctx, _sse_response(_AsyncSource(frames)) + ) + assert isinstance(response, httpx.Response) + body = b"".join([chunk async for chunk in response.aiter_bytes()]) + + outputs = [ + json.loads(line[len(b"data:") :])["data"]["attributes"]["output"] + for line in body.split(b"\n") + if line.startswith(b"data:") + ] + assert outputs == [ + {"type": "json", "value": {"n": n}, "encoding_options": []} for n in range(3) + ] + assert decoding_loops == [asyncio.get_running_loop()] * 3 diff --git a/src/mistralai/extra/tests/test_struct_chat.py b/src/mistralai/extra/tests/test_struct_chat.py index 789ce5fdc..369fe0565 100644 --- a/src/mistralai/extra/tests/test_struct_chat.py +++ b/src/mistralai/extra/tests/test_struct_chat.py @@ -13,7 +13,7 @@ ThinkChunk, TextChunk, ) -from pydantic import BaseModel +from pydantic import BaseModel, ValidationError class Explanation(BaseModel): @@ -165,6 +165,31 @@ def test_convert_to_parsed_chat_completion_response_with_only_reasoning_chunks(s assert output.choices[0].message is not None self.assertIsNone(output.choices[0].message.parsed) + def test_convert_to_parsed_chat_completion_response_with_non_object_json(self): + for content, json_type in [ + ("[1, 2, 3]", "array"), + ("42", "number"), + ('"x = -4"', "string"), + ("true", "boolean"), + ("null", "null"), + ]: + with self.subTest(content=content): + response = mock_cc_response.model_copy(deep=True) + assert response.choices is not None + assert response.choices[0].message is not None + response.choices[0].message.content = content + with self.assertRaises(ValidationError) as ctx: + convert_to_parsed_chat_completion_response( + response, MathDemonstration + ) + errors = ctx.exception.errors() + self.assertEqual(len(errors), 1) + self.assertEqual(errors[0]["type"], "json_not_object") + self.assertEqual( + errors[0]["msg"], + f"Expected a JSON object to parse into MathDemonstration, got a JSON {json_type}", + ) + if __name__ == "__main__": unittest.main() diff --git a/src/mistralai/extra/utils/response_format.py b/src/mistralai/extra/utils/response_format.py index 3600156bb..6e1e198fc 100644 --- a/src/mistralai/extra/utils/response_format.py +++ b/src/mistralai/extra/utils/response_format.py @@ -1,6 +1,7 @@ from typing import Any, TypeVar, cast -from pydantic import BaseModel +from pydantic import BaseModel, ValidationError +from pydantic_core import InitErrorDetails, PydanticCustomError from mistralai.client.models import ResponseFormatTypedDict from ._pydantic_helper import rec_strict_json_schema @@ -29,9 +30,44 @@ def response_format_from_pydantic_model( ) +def _json_type_name(value: Any) -> str: + if value is None: + return "null" + if isinstance(value, bool): + return "boolean" + if isinstance(value, (int, float)): + return "number" + if isinstance(value, str): + return "string" + if isinstance(value, list): + return "array" + return type(value).__name__ + + def pydantic_model_from_json( - json_data: dict[str, Any], + json_data: Any, pydantic_model: type[CustomPydanticModel], ) -> CustomPydanticModel: - """Parse a JSON schema into a pydantic model.""" + """Parse decoded JSON into a pydantic model. + + Raises a ``ValidationError`` naming the model and the JSON type received when + the decoded JSON is not an object (e.g. the model answered an array). + """ + if not isinstance(json_data, dict): + raise ValidationError.from_exception_data( + pydantic_model.__name__, + [ + InitErrorDetails( + type=PydanticCustomError( + "json_not_object", + "Expected a JSON object to parse into {model}, got a JSON {json_type}", + { + "model": pydantic_model.__name__, + "json_type": _json_type_name(json_data), + }, + ), + input=json_data, + ) + ], + ) return pydantic_model.model_validate(json_data) diff --git a/uv.lock b/uv.lock index e4bdb064f..ee911ae6a 100644 --- a/uv.lock +++ b/uv.lock @@ -1274,7 +1274,7 @@ wheels = [ [[package]] name = "mistralai" -version = "3.8.0" +version = "3.9.0" source = { editable = "." } dependencies = [ { name = "eval-type-backport" },