mistralai 1.0.2__tar.gz → 1.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mistralai-1.0.2 → mistralai-1.1.0}/PKG-INFO +103 -74
- mistralai-1.0.2/README.md → mistralai-1.1.0/README-PYPI.md +97 -70
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/_hooks/sdkhooks.py +23 -4
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/_hooks/types.py +27 -9
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/basesdk.py +91 -6
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/chat.py +252 -144
- mistralai-1.1.0/packages/mistralai_azure/src/mistralai_azure/models/__init__.py +170 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/assistantmessage.py +18 -5
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionchoice.py +7 -3
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionrequest.py +65 -12
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionresponse.py +6 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionstreamrequest.py +67 -12
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/completionchunk.py +10 -3
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/completionevent.py +1 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/completionresponsestreamchoice.py +10 -4
- mistralai-1.1.0/packages/mistralai_azure/src/mistralai_azure/models/contentchunk.py +10 -0
- {mistralai-1.0.2/packages/mistralai_gcp/src/mistralai_gcp → mistralai-1.1.0/packages/mistralai_azure/src/mistralai_azure}/models/deltamessage.py +16 -5
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/function.py +3 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/functioncall.py +2 -2
- mistralai-1.1.0/packages/mistralai_azure/src/mistralai_azure/models/functionname.py +17 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/httpvalidationerror.py +2 -2
- mistralai-1.1.0/packages/mistralai_azure/src/mistralai_azure/models/responseformat.py +17 -0
- mistralai-1.0.2/src/mistralai/models/responseformat.py → mistralai-1.1.0/packages/mistralai_azure/src/mistralai_azure/models/responseformats.py +1 -11
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/security.py +12 -3
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/systemmessage.py +6 -5
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/textchunk.py +9 -4
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/tool.py +9 -8
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/toolcall.py +9 -7
- mistralai-1.1.0/packages/mistralai_azure/src/mistralai_azure/models/toolchoice.py +29 -0
- mistralai-1.1.0/packages/mistralai_azure/src/mistralai_azure/models/toolchoiceenum.py +7 -0
- {mistralai-1.0.2/packages/mistralai_gcp/src/mistralai_gcp → mistralai-1.1.0/packages/mistralai_azure/src/mistralai_azure}/models/toolmessage.py +18 -5
- mistralai-1.1.0/packages/mistralai_azure/src/mistralai_azure/models/tooltypes.py +8 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/usageinfo.py +3 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/usermessage.py +6 -5
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/validationerror.py +3 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/sdkconfiguration.py +6 -8
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/utils/__init__.py +8 -3
- {mistralai-1.0.2/packages/mistralai_gcp/src/mistralai_gcp → mistralai-1.1.0/packages/mistralai_azure/src/mistralai_azure}/utils/logger.py +6 -0
- {mistralai-1.0.2/src/mistralai → mistralai-1.1.0/packages/mistralai_azure/src/mistralai_azure}/utils/retries.py +2 -1
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/utils/security.py +12 -6
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/_hooks/sdkhooks.py +23 -4
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/_hooks/types.py +27 -9
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/basesdk.py +91 -6
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/chat.py +252 -144
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/fim.py +166 -110
- mistralai-1.1.0/packages/mistralai_gcp/src/mistralai_gcp/models/__init__.py +193 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/assistantmessage.py +18 -5
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionchoice.py +7 -3
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionrequest.py +62 -12
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionresponse.py +6 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionstreamrequest.py +64 -12
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/completionchunk.py +10 -3
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/completionevent.py +1 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/completionresponsestreamchoice.py +10 -4
- mistralai-1.1.0/packages/mistralai_gcp/src/mistralai_gcp/models/contentchunk.py +10 -0
- {mistralai-1.0.2/packages/mistralai_azure/src/mistralai_azure → mistralai-1.1.0/packages/mistralai_gcp/src/mistralai_gcp}/models/deltamessage.py +16 -5
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/fimcompletionrequest.py +33 -6
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/fimcompletionresponse.py +6 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/fimcompletionstreamrequest.py +33 -6
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/function.py +3 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/functioncall.py +2 -2
- mistralai-1.1.0/packages/mistralai_gcp/src/mistralai_gcp/models/functionname.py +17 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/httpvalidationerror.py +2 -2
- mistralai-1.1.0/packages/mistralai_gcp/src/mistralai_gcp/models/responseformat.py +17 -0
- mistralai-1.0.2/packages/mistralai_gcp/src/mistralai_gcp/models/responseformat.py → mistralai-1.1.0/packages/mistralai_gcp/src/mistralai_gcp/models/responseformats.py +1 -11
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/security.py +12 -3
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/systemmessage.py +6 -5
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/textchunk.py +9 -4
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/tool.py +9 -8
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/toolcall.py +9 -7
- mistralai-1.1.0/packages/mistralai_gcp/src/mistralai_gcp/models/toolchoice.py +29 -0
- mistralai-1.1.0/packages/mistralai_gcp/src/mistralai_gcp/models/toolchoiceenum.py +7 -0
- {mistralai-1.0.2/packages/mistralai_azure/src/mistralai_azure → mistralai-1.1.0/packages/mistralai_gcp/src/mistralai_gcp}/models/toolmessage.py +18 -5
- mistralai-1.1.0/packages/mistralai_gcp/src/mistralai_gcp/models/tooltypes.py +8 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/usageinfo.py +3 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/usermessage.py +6 -5
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/validationerror.py +3 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/sdk.py +14 -10
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/sdkconfiguration.py +6 -8
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/__init__.py +8 -3
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/forms.py +10 -9
- {mistralai-1.0.2/packages/mistralai_azure/src/mistralai_azure → mistralai-1.1.0/packages/mistralai_gcp/src/mistralai_gcp}/utils/headers.py +8 -8
- {mistralai-1.0.2/packages/mistralai_azure/src/mistralai_azure → mistralai-1.1.0/packages/mistralai_gcp/src/mistralai_gcp}/utils/logger.py +6 -0
- {mistralai-1.0.2/packages/mistralai_azure/src/mistralai_azure → mistralai-1.1.0/packages/mistralai_gcp/src/mistralai_gcp}/utils/queryparams.py +16 -14
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/retries.py +2 -1
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/security.py +12 -6
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/serializers.py +17 -8
- {mistralai-1.0.2/packages/mistralai_azure/src/mistralai_azure → mistralai-1.1.0/packages/mistralai_gcp/src/mistralai_gcp}/utils/url.py +13 -8
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/values.py +6 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/pyproject.toml +14 -5
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/_hooks/sdkhooks.py +23 -4
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/_hooks/types.py +27 -9
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/agents.py +286 -150
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/basesdk.py +90 -5
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/chat.py +260 -144
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/embeddings.py +73 -53
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/files.py +252 -192
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/fim.py +174 -110
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/fine_tuning.py +3 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/jobs.py +372 -263
- mistralai-1.1.0/src/mistralai/models/__init__.py +535 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/agentscompletionrequest.py +47 -11
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/agentscompletionstreamrequest.py +49 -11
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/archiveftmodelout.py +6 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/assistantmessage.py +11 -4
- mistralai-1.0.2/src/mistralai/models/modelcard.py → mistralai-1.1.0/src/mistralai/models/basemodelcard.py +37 -14
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/chatcompletionchoice.py +4 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/chatcompletionrequest.py +57 -11
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/chatcompletionresponse.py +6 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/chatcompletionstreamrequest.py +59 -11
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/checkpointout.py +3 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/completionchunk.py +10 -3
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/completionevent.py +1 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/completionresponsestreamchoice.py +13 -5
- mistralai-1.1.0/src/mistralai/models/contentchunk.py +20 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/delete_model_v1_models_model_id_deleteop.py +4 -3
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/deletefileout.py +3 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/deletemodelout.py +3 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/deltamessage.py +9 -4
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/detailedjobout.py +59 -7
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/embeddingrequest.py +9 -4
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/embeddingresponse.py +5 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/embeddingresponsedata.py +3 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/eventout.py +9 -4
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/files_api_routes_delete_fileop.py +4 -3
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/files_api_routes_retrieve_fileop.py +4 -3
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/files_api_routes_upload_fileop.py +27 -8
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/fileschema.py +26 -5
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/fimcompletionrequest.py +26 -5
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/fimcompletionresponse.py +6 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/fimcompletionstreamrequest.py +26 -5
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/finetuneablemodel.py +7 -1
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/ftmodelcapabilitiesout.py +4 -2
- mistralai-1.1.0/src/mistralai/models/ftmodelcard.py +103 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/ftmodelout.py +32 -6
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/function.py +3 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/functioncall.py +2 -2
- mistralai-1.1.0/src/mistralai/models/functionname.py +17 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/githubrepositoryin.py +15 -4
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/githubrepositoryout.py +15 -4
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/httpvalidationerror.py +2 -2
- mistralai-1.1.0/src/mistralai/models/imageurl.py +48 -0
- mistralai-1.1.0/src/mistralai/models/imageurlchunk.py +32 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/jobin.py +22 -5
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/jobmetadataout.py +31 -6
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/jobout.py +55 -7
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/jobs_api_routes_fine_tuning_archive_fine_tuned_modelop.py +4 -3
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/jobs_api_routes_fine_tuning_cancel_fine_tuning_jobop.py +4 -3
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/jobs_api_routes_fine_tuning_create_fine_tuning_jobop.py +3 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobop.py +4 -3
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py +83 -16
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/jobs_api_routes_fine_tuning_start_fine_tuning_jobop.py +4 -3
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/jobs_api_routes_fine_tuning_unarchive_fine_tuned_modelop.py +4 -3
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/jobs_api_routes_fine_tuning_update_fine_tuned_modelop.py +9 -4
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/jobsout.py +6 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/legacyjobmetadataout.py +45 -6
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/listfilesout.py +2 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/metricout.py +11 -6
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/modelcapabilities.py +7 -2
- mistralai-1.1.0/src/mistralai/models/modellist.py +32 -0
- mistralai-1.1.0/src/mistralai/models/responseformat.py +17 -0
- mistralai-1.0.2/packages/mistralai_azure/src/mistralai_azure/models/responseformat.py → mistralai-1.1.0/src/mistralai/models/responseformats.py +1 -11
- mistralai-1.1.0/src/mistralai/models/retrieve_model_v1_models_model_id_getop.py +37 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/retrievefileout.py +26 -5
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/security.py +12 -3
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/systemmessage.py +6 -5
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/textchunk.py +9 -4
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/tool.py +9 -8
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/toolcall.py +9 -7
- mistralai-1.1.0/src/mistralai/models/toolchoice.py +29 -0
- mistralai-1.1.0/src/mistralai/models/toolchoiceenum.py +7 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/toolmessage.py +11 -4
- mistralai-1.1.0/src/mistralai/models/tooltypes.py +8 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/trainingfile.py +2 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/trainingparameters.py +27 -6
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/trainingparametersin.py +29 -8
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/unarchiveftmodelout.py +6 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/updateftmodelin.py +8 -4
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/uploadfileout.py +26 -5
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/usageinfo.py +3 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/usermessage.py +6 -5
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/validationerror.py +3 -2
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/wandbintegration.py +14 -4
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/wandbintegrationout.py +13 -4
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models_.py +392 -294
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/sdk.py +24 -19
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/sdkconfiguration.py +6 -8
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/utils/__init__.py +6 -1
- {mistralai-1.0.2/packages/mistralai_azure/src/mistralai_azure → mistralai-1.1.0/src/mistralai}/utils/forms.py +10 -9
- {mistralai-1.0.2/packages/mistralai_gcp/src/mistralai_gcp → mistralai-1.1.0/src/mistralai}/utils/headers.py +8 -8
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/utils/logger.py +4 -1
- {mistralai-1.0.2/packages/mistralai_gcp/src/mistralai_gcp → mistralai-1.1.0/src/mistralai}/utils/queryparams.py +16 -14
- {mistralai-1.0.2/packages/mistralai_azure/src/mistralai_azure → mistralai-1.1.0/src/mistralai}/utils/retries.py +2 -1
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/utils/security.py +13 -6
- {mistralai-1.0.2/packages/mistralai_azure/src/mistralai_azure → mistralai-1.1.0/src/mistralai}/utils/serializers.py +17 -8
- {mistralai-1.0.2/packages/mistralai_gcp/src/mistralai_gcp → mistralai-1.1.0/src/mistralai}/utils/url.py +13 -8
- {mistralai-1.0.2/packages/mistralai_azure/src/mistralai_azure → mistralai-1.1.0/src/mistralai}/utils/values.py +6 -0
- mistralai-1.0.2/packages/mistralai_azure/src/mistralai_azure/models/__init__.py +0 -28
- mistralai-1.0.2/packages/mistralai_azure/src/mistralai_azure/models/contentchunk.py +0 -17
- mistralai-1.0.2/packages/mistralai_gcp/src/mistralai_gcp/models/__init__.py +0 -31
- mistralai-1.0.2/packages/mistralai_gcp/src/mistralai_gcp/models/contentchunk.py +0 -17
- mistralai-1.0.2/src/mistralai/models/__init__.py +0 -82
- mistralai-1.0.2/src/mistralai/models/contentchunk.py +0 -17
- mistralai-1.0.2/src/mistralai/models/modellist.py +0 -18
- mistralai-1.0.2/src/mistralai/models/retrieve_model_v1_models_model_id_getop.py +0 -18
- {mistralai-1.0.2 → mistralai-1.1.0}/LICENSE +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/__init__.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/_hooks/__init__.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/_hooks/custom_user_agent.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/_hooks/registration.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/httpclient.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/models/sdkerror.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/py.typed +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/sdk.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/types/__init__.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/types/basemodel.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/utils/annotations.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/utils/enums.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/utils/eventstreaming.py +0 -0
- {mistralai-1.0.2/src/mistralai → mistralai-1.1.0/packages/mistralai_azure/src/mistralai_azure}/utils/forms.py +0 -0
- {mistralai-1.0.2/src/mistralai → mistralai-1.1.0/packages/mistralai_azure/src/mistralai_azure}/utils/headers.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/utils/metadata.py +0 -0
- {mistralai-1.0.2/src/mistralai → mistralai-1.1.0/packages/mistralai_azure/src/mistralai_azure}/utils/queryparams.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_azure/src/mistralai_azure/utils/requestbodies.py +0 -0
- {mistralai-1.0.2/src/mistralai → mistralai-1.1.0/packages/mistralai_azure/src/mistralai_azure}/utils/serializers.py +0 -0
- {mistralai-1.0.2/src/mistralai → mistralai-1.1.0/packages/mistralai_azure/src/mistralai_azure}/utils/url.py +0 -0
- {mistralai-1.0.2/src/mistralai → mistralai-1.1.0/packages/mistralai_azure/src/mistralai_azure}/utils/values.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/__init__.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/_hooks/__init__.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/_hooks/custom_user_agent.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/_hooks/registration.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/httpclient.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/models/sdkerror.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/py.typed +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/types/__init__.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/types/basemodel.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/annotations.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/enums.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/eventstreaming.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/metadata.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/requestbodies.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/py.typed +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/__init__.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/_hooks/__init__.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/_hooks/custom_user_agent.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/_hooks/deprecation_warning.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/_hooks/registration.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/async_client.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/client.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/httpclient.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/sampletype.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/sdkerror.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/models/source.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/py.typed +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/types/__init__.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/types/basemodel.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/utils/annotations.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/utils/enums.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/utils/eventstreaming.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/utils/metadata.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/utils/requestbodies.py +0 -0
- {mistralai-1.0.2 → mistralai-1.1.0}/src/mistralai/version.py +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mistralai
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Python Client SDK for the Mistral AI API.
|
|
5
|
+
Home-page: https://github.com/mistralai/client-python.git
|
|
5
6
|
Author: Mistral
|
|
6
7
|
Requires-Python: >=3.8,<4.0
|
|
7
8
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -11,20 +12,22 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
11
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
12
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
14
|
Provides-Extra: gcp
|
|
14
|
-
Requires-Dist:
|
|
15
|
+
Requires-Dist: eval-type-backport (>=0.2.0,<0.3.0)
|
|
16
|
+
Requires-Dist: google-auth (==2.27.0) ; extra == "gcp"
|
|
15
17
|
Requires-Dist: httpx (>=0.27.0,<0.28.0)
|
|
16
18
|
Requires-Dist: jsonpath-python (>=1.0.6,<2.0.0)
|
|
17
|
-
Requires-Dist: pydantic (>=2.
|
|
18
|
-
Requires-Dist: python-dateutil (
|
|
19
|
+
Requires-Dist: pydantic (>=2.9.0,<3.0.0)
|
|
20
|
+
Requires-Dist: python-dateutil (==2.8.2)
|
|
19
21
|
Requires-Dist: requests (>=2.32.3,<3.0.0) ; extra == "gcp"
|
|
20
22
|
Requires-Dist: typing-inspect (>=0.9.0,<0.10.0)
|
|
23
|
+
Project-URL: Repository, https://github.com/mistralai/client-python.git
|
|
21
24
|
Description-Content-Type: text/markdown
|
|
22
25
|
|
|
23
26
|
# Mistral Python Client
|
|
24
27
|
|
|
25
28
|
## Migration warning
|
|
26
29
|
|
|
27
|
-
This documentation is for Mistral AI SDK v1. You can find more details on how to migrate from v0 to v1 [here](MIGRATION.md)
|
|
30
|
+
This documentation is for Mistral AI SDK v1. You can find more details on how to migrate from v0 to v1 [here](https://github.com/mistralai/client-python/blob/master/MIGRATION.md)
|
|
28
31
|
|
|
29
32
|
## API Key Setup
|
|
30
33
|
|
|
@@ -41,15 +44,46 @@ $ echo 'export MISTRAL_API_KEY=[your_key_here]' >> ~/.zshenv
|
|
|
41
44
|
$ source ~/.zshenv
|
|
42
45
|
```
|
|
43
46
|
|
|
47
|
+
<!-- Start Summary [summary] -->
|
|
48
|
+
## Summary
|
|
49
|
+
|
|
50
|
+
Mistral AI API: Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
|
|
51
|
+
<!-- End Summary [summary] -->
|
|
52
|
+
|
|
53
|
+
<!-- Start Table of Contents [toc] -->
|
|
54
|
+
## Table of Contents
|
|
55
|
+
|
|
56
|
+
* [SDK Installation](https://github.com/mistralai/client-python/blob/master/#sdk-installation)
|
|
57
|
+
* [IDE Support](https://github.com/mistralai/client-python/blob/master/#ide-support)
|
|
58
|
+
* [SDK Example Usage](https://github.com/mistralai/client-python/blob/master/#sdk-example-usage)
|
|
59
|
+
* [Available Resources and Operations](https://github.com/mistralai/client-python/blob/master/#available-resources-and-operations)
|
|
60
|
+
* [Server-sent event streaming](https://github.com/mistralai/client-python/blob/master/#server-sent-event-streaming)
|
|
61
|
+
* [File uploads](https://github.com/mistralai/client-python/blob/master/#file-uploads)
|
|
62
|
+
* [Retries](https://github.com/mistralai/client-python/blob/master/#retries)
|
|
63
|
+
* [Error Handling](https://github.com/mistralai/client-python/blob/master/#error-handling)
|
|
64
|
+
* [Server Selection](https://github.com/mistralai/client-python/blob/master/#server-selection)
|
|
65
|
+
* [Custom HTTP Client](https://github.com/mistralai/client-python/blob/master/#custom-http-client)
|
|
66
|
+
* [Authentication](https://github.com/mistralai/client-python/blob/master/#authentication)
|
|
67
|
+
* [Debugging](https://github.com/mistralai/client-python/blob/master/#debugging)
|
|
68
|
+
<!-- End Table of Contents [toc] -->
|
|
69
|
+
|
|
44
70
|
<!-- Start SDK Installation [installation] -->
|
|
45
71
|
## SDK Installation
|
|
46
72
|
|
|
47
|
-
|
|
73
|
+
The SDK can be installed with either *pip* or *poetry* package managers.
|
|
74
|
+
|
|
75
|
+
### PIP
|
|
76
|
+
|
|
77
|
+
*PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.
|
|
78
|
+
|
|
48
79
|
```bash
|
|
49
80
|
pip install mistralai
|
|
50
81
|
```
|
|
51
82
|
|
|
52
|
-
Poetry
|
|
83
|
+
### Poetry
|
|
84
|
+
|
|
85
|
+
*Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies.
|
|
86
|
+
|
|
53
87
|
```bash
|
|
54
88
|
poetry add mistralai
|
|
55
89
|
```
|
|
@@ -71,7 +105,6 @@ s = Mistral(
|
|
|
71
105
|
api_key=os.getenv("MISTRAL_API_KEY", ""),
|
|
72
106
|
)
|
|
73
107
|
|
|
74
|
-
|
|
75
108
|
res = s.chat.complete(model="mistral-small-latest", messages=[
|
|
76
109
|
{
|
|
77
110
|
"content": "Who is the best French painter? Answer in one short sentence.",
|
|
@@ -123,10 +156,9 @@ s = Mistral(
|
|
|
123
156
|
api_key=os.getenv("MISTRAL_API_KEY", ""),
|
|
124
157
|
)
|
|
125
158
|
|
|
126
|
-
|
|
127
159
|
res = s.files.upload(file={
|
|
128
|
-
"file_name": "
|
|
129
|
-
"content": open("
|
|
160
|
+
"file_name": "example.file",
|
|
161
|
+
"content": open("example.file", "rb"),
|
|
130
162
|
})
|
|
131
163
|
|
|
132
164
|
if res is not None:
|
|
@@ -148,8 +180,8 @@ async def main():
|
|
|
148
180
|
api_key=os.getenv("MISTRAL_API_KEY", ""),
|
|
149
181
|
)
|
|
150
182
|
res = await s.files.upload_async(file={
|
|
151
|
-
"file_name": "
|
|
152
|
-
"content": open("
|
|
183
|
+
"file_name": "example.file",
|
|
184
|
+
"content": open("example.file", "rb"),
|
|
153
185
|
})
|
|
154
186
|
if res is not None:
|
|
155
187
|
# handle response
|
|
@@ -171,11 +203,9 @@ s = Mistral(
|
|
|
171
203
|
api_key=os.getenv("MISTRAL_API_KEY", ""),
|
|
172
204
|
)
|
|
173
205
|
|
|
174
|
-
|
|
175
206
|
res = s.agents.complete(messages=[
|
|
176
207
|
{
|
|
177
|
-
"content": "
|
|
178
|
-
"role": "user",
|
|
208
|
+
"content": "<value>",
|
|
179
209
|
},
|
|
180
210
|
], agent_id="<value>")
|
|
181
211
|
|
|
@@ -226,7 +256,7 @@ You can run the examples in the `examples/` directory using `poetry run` or by e
|
|
|
226
256
|
Before you begin, ensure you have `AZUREAI_ENDPOINT` and an `AZURE_API_KEY`. To obtain these, you will need to deploy Mistral on Azure AI.
|
|
227
257
|
See [instructions for deploying Mistral on Azure AI here](https://docs.mistral.ai/deployment/cloud/azure/).
|
|
228
258
|
|
|
229
|
-
Here's a basic example to get you started. You can also run [the example in the `examples` directory](/examples/azure).
|
|
259
|
+
Here's a basic example to get you started. You can also run [the example in the `examples` directory](https://github.com/mistralai/client-python/blob/master//examples/azure).
|
|
230
260
|
|
|
231
261
|
```python
|
|
232
262
|
import asyncio
|
|
@@ -254,7 +284,7 @@ async def main() -> None:
|
|
|
254
284
|
|
|
255
285
|
asyncio.run(main())
|
|
256
286
|
```
|
|
257
|
-
The documentation for the Azure SDK is available [here](packages/mistralai_azure/README.md).
|
|
287
|
+
The documentation for the Azure SDK is available [here](https://github.com/mistralai/client-python/blob/master/packages/mistralai_azure/README.md).
|
|
258
288
|
|
|
259
289
|
### Google Cloud
|
|
260
290
|
|
|
@@ -303,55 +333,63 @@ async def main() -> None:
|
|
|
303
333
|
asyncio.run(main())
|
|
304
334
|
```
|
|
305
335
|
|
|
306
|
-
The documentation for the GCP SDK is available [here](packages/mistralai_gcp/README.md).
|
|
336
|
+
The documentation for the GCP SDK is available [here](https://github.com/mistralai/client-python/blob/master/packages/mistralai_gcp/README.md).
|
|
307
337
|
|
|
308
338
|
|
|
309
339
|
<!-- Start Available Resources and Operations [operations] -->
|
|
310
340
|
## Available Resources and Operations
|
|
311
341
|
|
|
312
|
-
|
|
342
|
+
<details open>
|
|
343
|
+
<summary>Available methods</summary>
|
|
344
|
+
|
|
345
|
+
### [agents](https://github.com/mistralai/client-python/blob/master/docs/sdks/agents/README.md)
|
|
346
|
+
|
|
347
|
+
* [complete](https://github.com/mistralai/client-python/blob/master/docs/sdks/agents/README.md#complete) - Agents Completion
|
|
348
|
+
* [stream](https://github.com/mistralai/client-python/blob/master/docs/sdks/agents/README.md#stream) - Stream Agents completion
|
|
313
349
|
|
|
314
|
-
|
|
315
|
-
* [retrieve](docs/sdks/models/README.md#retrieve) - Retrieve Model
|
|
316
|
-
* [delete](docs/sdks/models/README.md#delete) - Delete Model
|
|
317
|
-
* [update](docs/sdks/models/README.md#update) - Update Fine Tuned Model
|
|
318
|
-
* [archive](docs/sdks/models/README.md#archive) - Archive Fine Tuned Model
|
|
319
|
-
* [unarchive](docs/sdks/models/README.md#unarchive) - Unarchive Fine Tuned Model
|
|
350
|
+
### [chat](https://github.com/mistralai/client-python/blob/master/docs/sdks/chat/README.md)
|
|
320
351
|
|
|
321
|
-
|
|
352
|
+
* [complete](https://github.com/mistralai/client-python/blob/master/docs/sdks/chat/README.md#complete) - Chat Completion
|
|
353
|
+
* [stream](https://github.com/mistralai/client-python/blob/master/docs/sdks/chat/README.md#stream) - Stream chat completion
|
|
322
354
|
|
|
323
|
-
|
|
324
|
-
* [list](docs/sdks/files/README.md#list) - List Files
|
|
325
|
-
* [retrieve](docs/sdks/files/README.md#retrieve) - Retrieve File
|
|
326
|
-
* [delete](docs/sdks/files/README.md#delete) - Delete File
|
|
355
|
+
### [embeddings](https://github.com/mistralai/client-python/blob/master/docs/sdks/embeddings/README.md)
|
|
327
356
|
|
|
357
|
+
* [create](https://github.com/mistralai/client-python/blob/master/docs/sdks/embeddings/README.md#create) - Embeddings
|
|
328
358
|
|
|
329
|
-
### [
|
|
359
|
+
### [files](https://github.com/mistralai/client-python/blob/master/docs/sdks/files/README.md)
|
|
330
360
|
|
|
331
|
-
* [
|
|
332
|
-
* [
|
|
333
|
-
* [
|
|
334
|
-
* [
|
|
335
|
-
* [start](docs/sdks/jobs/README.md#start) - Start Fine Tuning Job
|
|
361
|
+
* [upload](https://github.com/mistralai/client-python/blob/master/docs/sdks/files/README.md#upload) - Upload File
|
|
362
|
+
* [list](https://github.com/mistralai/client-python/blob/master/docs/sdks/files/README.md#list) - List Files
|
|
363
|
+
* [retrieve](https://github.com/mistralai/client-python/blob/master/docs/sdks/files/README.md#retrieve) - Retrieve File
|
|
364
|
+
* [delete](https://github.com/mistralai/client-python/blob/master/docs/sdks/files/README.md#delete) - Delete File
|
|
336
365
|
|
|
337
|
-
### [
|
|
366
|
+
### [fim](https://github.com/mistralai/client-python/blob/master/docs/sdks/fim/README.md)
|
|
338
367
|
|
|
339
|
-
* [complete](docs/sdks/
|
|
340
|
-
* [stream](docs/sdks/
|
|
368
|
+
* [complete](https://github.com/mistralai/client-python/blob/master/docs/sdks/fim/README.md#complete) - Fim Completion
|
|
369
|
+
* [stream](https://github.com/mistralai/client-python/blob/master/docs/sdks/fim/README.md#stream) - Stream fim completion
|
|
341
370
|
|
|
342
|
-
### [
|
|
371
|
+
### [fine_tuning](https://github.com/mistralai/client-python/blob/master/docs/sdks/finetuning/README.md)
|
|
343
372
|
|
|
344
|
-
* [complete](docs/sdks/fim/README.md#complete) - Fim Completion
|
|
345
|
-
* [stream](docs/sdks/fim/README.md#stream) - Stream fim completion
|
|
346
373
|
|
|
347
|
-
|
|
374
|
+
#### [fine_tuning.jobs](https://github.com/mistralai/client-python/blob/master/docs/sdks/jobs/README.md)
|
|
348
375
|
|
|
349
|
-
* [
|
|
350
|
-
* [
|
|
376
|
+
* [list](https://github.com/mistralai/client-python/blob/master/docs/sdks/jobs/README.md#list) - Get Fine Tuning Jobs
|
|
377
|
+
* [create](https://github.com/mistralai/client-python/blob/master/docs/sdks/jobs/README.md#create) - Create Fine Tuning Job
|
|
378
|
+
* [get](https://github.com/mistralai/client-python/blob/master/docs/sdks/jobs/README.md#get) - Get Fine Tuning Job
|
|
379
|
+
* [cancel](https://github.com/mistralai/client-python/blob/master/docs/sdks/jobs/README.md#cancel) - Cancel Fine Tuning Job
|
|
380
|
+
* [start](https://github.com/mistralai/client-python/blob/master/docs/sdks/jobs/README.md#start) - Start Fine Tuning Job
|
|
351
381
|
|
|
352
|
-
### [embeddings](docs/sdks/embeddings/README.md)
|
|
353
382
|
|
|
354
|
-
|
|
383
|
+
### [models](https://github.com/mistralai/client-python/blob/master/docs/sdks/models/README.md)
|
|
384
|
+
|
|
385
|
+
* [list](https://github.com/mistralai/client-python/blob/master/docs/sdks/models/README.md#list) - List Models
|
|
386
|
+
* [retrieve](https://github.com/mistralai/client-python/blob/master/docs/sdks/models/README.md#retrieve) - Retrieve Model
|
|
387
|
+
* [delete](https://github.com/mistralai/client-python/blob/master/docs/sdks/models/README.md#delete) - Delete Model
|
|
388
|
+
* [update](https://github.com/mistralai/client-python/blob/master/docs/sdks/models/README.md#update) - Update Fine Tuned Model
|
|
389
|
+
* [archive](https://github.com/mistralai/client-python/blob/master/docs/sdks/models/README.md#archive) - Archive Fine Tuned Model
|
|
390
|
+
* [unarchive](https://github.com/mistralai/client-python/blob/master/docs/sdks/models/README.md#unarchive) - Unarchive Fine Tuned Model
|
|
391
|
+
|
|
392
|
+
</details>
|
|
355
393
|
<!-- End Available Resources and Operations [operations] -->
|
|
356
394
|
|
|
357
395
|
<!-- Start Server-sent event streaming [eventstream] -->
|
|
@@ -371,7 +409,6 @@ s = Mistral(
|
|
|
371
409
|
api_key=os.getenv("MISTRAL_API_KEY", ""),
|
|
372
410
|
)
|
|
373
411
|
|
|
374
|
-
|
|
375
412
|
res = s.chat.stream(model="mistral-small-latest", messages=[
|
|
376
413
|
{
|
|
377
414
|
"content": "Who is the best French painter? Answer in one short sentence.",
|
|
@@ -408,10 +445,9 @@ s = Mistral(
|
|
|
408
445
|
api_key=os.getenv("MISTRAL_API_KEY", ""),
|
|
409
446
|
)
|
|
410
447
|
|
|
411
|
-
|
|
412
448
|
res = s.files.upload(file={
|
|
413
|
-
"file_name": "
|
|
414
|
-
"content": open("
|
|
449
|
+
"file_name": "example.file",
|
|
450
|
+
"content": open("example.file", "rb"),
|
|
415
451
|
})
|
|
416
452
|
|
|
417
453
|
if res is not None:
|
|
@@ -436,7 +472,6 @@ s = Mistral(
|
|
|
436
472
|
api_key=os.getenv("MISTRAL_API_KEY", ""),
|
|
437
473
|
)
|
|
438
474
|
|
|
439
|
-
|
|
440
475
|
res = s.models.list(,
|
|
441
476
|
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
|
|
442
477
|
|
|
@@ -457,7 +492,6 @@ s = Mistral(
|
|
|
457
492
|
api_key=os.getenv("MISTRAL_API_KEY", ""),
|
|
458
493
|
)
|
|
459
494
|
|
|
460
|
-
|
|
461
495
|
res = s.models.list()
|
|
462
496
|
|
|
463
497
|
if res is not None:
|
|
@@ -472,10 +506,10 @@ if res is not None:
|
|
|
472
506
|
|
|
473
507
|
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.
|
|
474
508
|
|
|
475
|
-
| Error Object | Status Code
|
|
476
|
-
| -------------------------- |
|
|
477
|
-
| models.HTTPValidationError | 422
|
|
478
|
-
| models.SDKError | 4xx-5xx
|
|
509
|
+
| Error Object | Status Code | Content Type |
|
|
510
|
+
| -------------------------- | ----------- | ---------------- |
|
|
511
|
+
| models.HTTPValidationError | 422 | application/json |
|
|
512
|
+
| models.SDKError | 4xx-5xx | */* |
|
|
479
513
|
|
|
480
514
|
### Example
|
|
481
515
|
|
|
@@ -491,17 +525,16 @@ res = None
|
|
|
491
525
|
try:
|
|
492
526
|
res = s.models.list()
|
|
493
527
|
|
|
528
|
+
if res is not None:
|
|
529
|
+
# handle response
|
|
530
|
+
pass
|
|
531
|
+
|
|
494
532
|
except models.HTTPValidationError as e:
|
|
495
|
-
# handle
|
|
533
|
+
# handle e.data: models.HTTPValidationErrorData
|
|
496
534
|
raise(e)
|
|
497
535
|
except models.SDKError as e:
|
|
498
536
|
# handle exception
|
|
499
537
|
raise(e)
|
|
500
|
-
|
|
501
|
-
if res is not None:
|
|
502
|
-
# handle response
|
|
503
|
-
pass
|
|
504
|
-
|
|
505
538
|
```
|
|
506
539
|
<!-- End Error Handling [errors] -->
|
|
507
540
|
|
|
@@ -512,9 +545,9 @@ if res is not None:
|
|
|
512
545
|
|
|
513
546
|
You can override the default server globally by passing a server name to the `server: str` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers:
|
|
514
547
|
|
|
515
|
-
| Name
|
|
516
|
-
|
|
|
517
|
-
| `prod` | `https://api.mistral.ai` | None
|
|
548
|
+
| Name | Server | Variables |
|
|
549
|
+
| ------ | ------------------------ | --------- |
|
|
550
|
+
| `prod` | `https://api.mistral.ai` | None |
|
|
518
551
|
|
|
519
552
|
#### Example
|
|
520
553
|
|
|
@@ -527,7 +560,6 @@ s = Mistral(
|
|
|
527
560
|
api_key=os.getenv("MISTRAL_API_KEY", ""),
|
|
528
561
|
)
|
|
529
562
|
|
|
530
|
-
|
|
531
563
|
res = s.models.list()
|
|
532
564
|
|
|
533
565
|
if res is not None:
|
|
@@ -549,7 +581,6 @@ s = Mistral(
|
|
|
549
581
|
api_key=os.getenv("MISTRAL_API_KEY", ""),
|
|
550
582
|
)
|
|
551
583
|
|
|
552
|
-
|
|
553
584
|
res = s.models.list()
|
|
554
585
|
|
|
555
586
|
if res is not None:
|
|
@@ -647,9 +678,9 @@ s = Mistral(async_client=CustomClient(httpx.AsyncClient()))
|
|
|
647
678
|
|
|
648
679
|
This SDK supports the following security scheme globally:
|
|
649
680
|
|
|
650
|
-
| Name
|
|
651
|
-
|
|
|
652
|
-
| `api_key`
|
|
681
|
+
| Name | Type | Scheme | Environment Variable |
|
|
682
|
+
| --------- | ---- | ----------- | -------------------- |
|
|
683
|
+
| `api_key` | http | HTTP Bearer | `MISTRAL_API_KEY` |
|
|
653
684
|
|
|
654
685
|
To authenticate with the API the `api_key` parameter must be set when initializing the SDK client instance. For example:
|
|
655
686
|
```python
|
|
@@ -660,7 +691,6 @@ s = Mistral(
|
|
|
660
691
|
api_key=os.getenv("MISTRAL_API_KEY", ""),
|
|
661
692
|
)
|
|
662
693
|
|
|
663
|
-
|
|
664
694
|
res = s.models.list()
|
|
665
695
|
|
|
666
696
|
if res is not None:
|
|
@@ -705,4 +735,3 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
|
|
|
705
735
|
|
|
706
736
|
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
|
|
707
737
|
We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
|
|
708
|
-
|