mistralai 1.3.0__tar.gz → 1.4.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.3.0 → mistralai-1.4.0}/PKG-INFO +9 -41
- {mistralai-1.3.0 → mistralai-1.4.0}/README-PYPI.md +7 -39
- {mistralai-1.3.0/packages/mistralai_azure/src/mistralai_azure → mistralai-1.4.0/packages/mistralai_gcp/src/mistralai_gcp}/_hooks/custom_user_agent.py +1 -1
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/sdk.py +1 -2
- {mistralai-1.3.0 → mistralai-1.4.0}/pyproject.toml +2 -2
- mistralai-1.4.0/src/mistralai/__init__.py +18 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/_version.py +4 -1
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/agents.py +58 -14
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/chat.py +58 -14
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/classifiers.py +32 -20
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/embeddings.py +16 -10
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/files.py +94 -34
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/fim.py +30 -14
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/jobs.py +80 -32
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/mistral_jobs.py +64 -24
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/__init__.py +5 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/agentscompletionrequest.py +5 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/agentscompletionstreamrequest.py +5 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/chatcompletionrequest.py +5 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/chatcompletionstreamrequest.py +5 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/fileschema.py +3 -2
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/function.py +3 -0
- mistralai-1.4.0/src/mistralai/models/prediction.py +26 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/retrievefileout.py +3 -2
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/toolcall.py +3 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/uploadfileout.py +3 -2
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models_.py +92 -48
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/sdk.py +2 -1
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/sdkconfiguration.py +10 -4
- mistralai-1.3.0/src/mistralai/__init__.py +0 -9
- {mistralai-1.3.0 → mistralai-1.4.0}/LICENSE +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/__init__.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/_hooks/__init__.py +0 -0
- {mistralai-1.3.0/packages/mistralai_gcp/src/mistralai_gcp → mistralai-1.4.0/packages/mistralai_azure/src/mistralai_azure}/_hooks/custom_user_agent.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/_hooks/registration.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/_hooks/sdkhooks.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/_hooks/types.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/_version.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/basesdk.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/chat.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/httpclient.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/__init__.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/assistantmessage.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionchoice.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionrequest.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionresponse.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/chatcompletionstreamrequest.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/completionchunk.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/completionevent.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/completionresponsestreamchoice.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/contentchunk.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/deltamessage.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/function.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/functioncall.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/functionname.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/httpvalidationerror.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/referencechunk.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/responseformat.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/responseformats.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/sdkerror.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/security.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/systemmessage.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/textchunk.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/tool.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/toolcall.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/toolchoice.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/toolchoiceenum.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/toolmessage.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/tooltypes.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/usageinfo.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/usermessage.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/models/validationerror.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/py.typed +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/sdk.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/sdkconfiguration.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/types/__init__.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/types/basemodel.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/utils/__init__.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/utils/annotations.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/utils/enums.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/utils/eventstreaming.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/utils/forms.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/utils/headers.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/utils/logger.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/utils/metadata.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/utils/queryparams.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/utils/requestbodies.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/utils/retries.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/utils/security.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/utils/serializers.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/utils/url.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_azure/src/mistralai_azure/utils/values.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/__init__.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/_hooks/__init__.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/_hooks/registration.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/_hooks/sdkhooks.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/_hooks/types.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/_version.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/basesdk.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/chat.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/fim.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/httpclient.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/__init__.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/assistantmessage.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionchoice.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionrequest.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionresponse.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/chatcompletionstreamrequest.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/completionchunk.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/completionevent.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/completionresponsestreamchoice.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/contentchunk.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/deltamessage.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/fimcompletionrequest.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/fimcompletionresponse.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/fimcompletionstreamrequest.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/function.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/functioncall.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/functionname.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/httpvalidationerror.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/referencechunk.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/responseformat.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/responseformats.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/sdkerror.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/security.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/systemmessage.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/textchunk.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/tool.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/toolcall.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/toolchoice.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/toolchoiceenum.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/toolmessage.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/tooltypes.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/usageinfo.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/usermessage.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/models/validationerror.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/py.typed +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/sdkconfiguration.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/types/__init__.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/types/basemodel.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/__init__.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/annotations.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/enums.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/eventstreaming.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/forms.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/headers.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/logger.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/metadata.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/queryparams.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/requestbodies.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/retries.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/security.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/serializers.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/url.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/packages/mistralai_gcp/src/mistralai_gcp/utils/values.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/py.typed +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/_hooks/__init__.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/_hooks/custom_user_agent.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/_hooks/deprecation_warning.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/_hooks/registration.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/_hooks/sdkhooks.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/_hooks/types.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/async_client.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/basesdk.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/batch.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/client.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/fine_tuning.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/httpclient.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/apiendpoint.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/archiveftmodelout.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/assistantmessage.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/basemodelcard.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/batcherror.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/batchjobin.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/batchjobout.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/batchjobsout.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/batchjobstatus.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/chatclassificationrequest.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/chatcompletionchoice.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/chatcompletionresponse.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/checkpointout.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/classificationobject.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/classificationrequest.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/classificationresponse.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/completionchunk.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/completionevent.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/completionresponsestreamchoice.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/contentchunk.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/delete_model_v1_models_model_id_deleteop.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/deletefileout.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/deletemodelout.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/deltamessage.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/detailedjobout.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/embeddingrequest.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/embeddingresponse.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/embeddingresponsedata.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/eventout.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/filepurpose.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/files_api_routes_delete_fileop.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/files_api_routes_download_fileop.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/files_api_routes_get_signed_urlop.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/files_api_routes_list_filesop.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/files_api_routes_retrieve_fileop.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/files_api_routes_upload_fileop.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/filesignedurl.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/fimcompletionrequest.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/fimcompletionresponse.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/fimcompletionstreamrequest.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/ftmodelcapabilitiesout.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/ftmodelcard.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/ftmodelout.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/functioncall.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/functionname.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/githubrepositoryin.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/githubrepositoryout.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/httpvalidationerror.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/imageurl.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/imageurlchunk.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/jobin.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/jobmetadataout.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/jobout.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/jobs_api_routes_batch_cancel_batch_jobop.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/jobs_api_routes_batch_get_batch_jobop.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/jobs_api_routes_batch_get_batch_jobsop.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/jobs_api_routes_fine_tuning_archive_fine_tuned_modelop.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/jobs_api_routes_fine_tuning_cancel_fine_tuning_jobop.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/jobs_api_routes_fine_tuning_create_fine_tuning_jobop.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobop.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/jobs_api_routes_fine_tuning_start_fine_tuning_jobop.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/jobs_api_routes_fine_tuning_unarchive_fine_tuned_modelop.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/jobs_api_routes_fine_tuning_update_fine_tuned_modelop.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/jobsout.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/legacyjobmetadataout.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/listfilesout.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/metricout.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/modelcapabilities.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/modellist.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/referencechunk.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/responseformat.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/responseformats.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/retrieve_model_v1_models_model_id_getop.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/sampletype.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/sdkerror.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/security.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/source.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/systemmessage.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/textchunk.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/tool.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/toolchoice.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/toolchoiceenum.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/toolmessage.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/tooltypes.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/trainingfile.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/trainingparameters.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/trainingparametersin.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/unarchiveftmodelout.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/updateftmodelin.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/usageinfo.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/usermessage.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/validationerror.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/wandbintegration.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/models/wandbintegrationout.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/py.typed +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/types/__init__.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/types/basemodel.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/utils/__init__.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/utils/annotations.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/utils/enums.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/utils/eventstreaming.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/utils/forms.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/utils/headers.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/utils/logger.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/utils/metadata.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/utils/queryparams.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/utils/requestbodies.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/utils/retries.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/utils/security.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/utils/serializers.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/utils/url.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/utils/values.py +0 -0
- {mistralai-1.3.0 → mistralai-1.4.0}/src/mistralai/version.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: mistralai
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0
|
|
4
4
|
Summary: Python Client SDK for the Mistral AI API.
|
|
5
5
|
Author: Mistral
|
|
6
|
-
Requires-Python: >=3.8
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
7
|
Classifier: Programming Language :: Python :: 3
|
|
8
8
|
Classifier: Programming Language :: Python :: 3.8
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.9
|
|
@@ -117,9 +117,7 @@ with Mistral(
|
|
|
117
117
|
"content": "Who is the best French painter? Answer in one short sentence.",
|
|
118
118
|
"role": "user",
|
|
119
119
|
},
|
|
120
|
-
])
|
|
121
|
-
|
|
122
|
-
assert res is not None
|
|
120
|
+
], stream=False)
|
|
123
121
|
|
|
124
122
|
# Handle response
|
|
125
123
|
print(res)
|
|
@@ -144,9 +142,7 @@ async def main():
|
|
|
144
142
|
"content": "Who is the best French painter? Answer in one short sentence.",
|
|
145
143
|
"role": "user",
|
|
146
144
|
},
|
|
147
|
-
])
|
|
148
|
-
|
|
149
|
-
assert res is not None
|
|
145
|
+
], stream=False)
|
|
150
146
|
|
|
151
147
|
# Handle response
|
|
152
148
|
print(res)
|
|
@@ -172,8 +168,6 @@ with Mistral(
|
|
|
172
168
|
"content": open("example.file", "rb"),
|
|
173
169
|
})
|
|
174
170
|
|
|
175
|
-
assert res is not None
|
|
176
|
-
|
|
177
171
|
# Handle response
|
|
178
172
|
print(res)
|
|
179
173
|
```
|
|
@@ -197,8 +191,6 @@ async def main():
|
|
|
197
191
|
"content": open("example.file", "rb"),
|
|
198
192
|
})
|
|
199
193
|
|
|
200
|
-
assert res is not None
|
|
201
|
-
|
|
202
194
|
# Handle response
|
|
203
195
|
print(res)
|
|
204
196
|
|
|
@@ -223,9 +215,7 @@ with Mistral(
|
|
|
223
215
|
"content": "Who is the best French painter? Answer in one short sentence.",
|
|
224
216
|
"role": "user",
|
|
225
217
|
},
|
|
226
|
-
], agent_id="<
|
|
227
|
-
|
|
228
|
-
assert res is not None
|
|
218
|
+
], agent_id="<id>", stream=False)
|
|
229
219
|
|
|
230
220
|
# Handle response
|
|
231
221
|
print(res)
|
|
@@ -250,9 +240,7 @@ async def main():
|
|
|
250
240
|
"content": "Who is the best French painter? Answer in one short sentence.",
|
|
251
241
|
"role": "user",
|
|
252
242
|
},
|
|
253
|
-
], agent_id="<
|
|
254
|
-
|
|
255
|
-
assert res is not None
|
|
243
|
+
], agent_id="<id>", stream=False)
|
|
256
244
|
|
|
257
245
|
# Handle response
|
|
258
246
|
print(res)
|
|
@@ -276,9 +264,7 @@ with Mistral(
|
|
|
276
264
|
res = mistral.embeddings.create(inputs=[
|
|
277
265
|
"Embed this sentence.",
|
|
278
266
|
"As well as this one.",
|
|
279
|
-
], model="
|
|
280
|
-
|
|
281
|
-
assert res is not None
|
|
267
|
+
], model="mistral-embed")
|
|
282
268
|
|
|
283
269
|
# Handle response
|
|
284
270
|
print(res)
|
|
@@ -301,9 +287,7 @@ async def main():
|
|
|
301
287
|
res = await mistral.embeddings.create_async(inputs=[
|
|
302
288
|
"Embed this sentence.",
|
|
303
289
|
"As well as this one.",
|
|
304
|
-
], model="
|
|
305
|
-
|
|
306
|
-
assert res is not None
|
|
290
|
+
], model="mistral-embed")
|
|
307
291
|
|
|
308
292
|
# Handle response
|
|
309
293
|
print(res)
|
|
@@ -505,9 +489,7 @@ with Mistral(
|
|
|
505
489
|
"content": "Who is the best French painter? Answer in one short sentence.",
|
|
506
490
|
"role": "user",
|
|
507
491
|
},
|
|
508
|
-
])
|
|
509
|
-
|
|
510
|
-
assert res is not None
|
|
492
|
+
], stream=True)
|
|
511
493
|
|
|
512
494
|
with res as event_stream:
|
|
513
495
|
for event in event_stream:
|
|
@@ -544,8 +526,6 @@ with Mistral(
|
|
|
544
526
|
"content": open("example.file", "rb"),
|
|
545
527
|
})
|
|
546
528
|
|
|
547
|
-
assert res is not None
|
|
548
|
-
|
|
549
529
|
# Handle response
|
|
550
530
|
print(res)
|
|
551
531
|
|
|
@@ -570,8 +550,6 @@ with Mistral(
|
|
|
570
550
|
res = mistral.models.list(,
|
|
571
551
|
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
|
|
572
552
|
|
|
573
|
-
assert res is not None
|
|
574
|
-
|
|
575
553
|
# Handle response
|
|
576
554
|
print(res)
|
|
577
555
|
|
|
@@ -590,8 +568,6 @@ with Mistral(
|
|
|
590
568
|
|
|
591
569
|
res = mistral.models.list()
|
|
592
570
|
|
|
593
|
-
assert res is not None
|
|
594
|
-
|
|
595
571
|
# Handle response
|
|
596
572
|
print(res)
|
|
597
573
|
|
|
@@ -633,8 +609,6 @@ with Mistral(
|
|
|
633
609
|
|
|
634
610
|
res = mistral.models.list()
|
|
635
611
|
|
|
636
|
-
assert res is not None
|
|
637
|
-
|
|
638
612
|
# Handle response
|
|
639
613
|
print(res)
|
|
640
614
|
|
|
@@ -671,8 +645,6 @@ with Mistral(
|
|
|
671
645
|
|
|
672
646
|
res = mistral.models.list()
|
|
673
647
|
|
|
674
|
-
assert res is not None
|
|
675
|
-
|
|
676
648
|
# Handle response
|
|
677
649
|
print(res)
|
|
678
650
|
|
|
@@ -692,8 +664,6 @@ with Mistral(
|
|
|
692
664
|
|
|
693
665
|
res = mistral.models.list()
|
|
694
666
|
|
|
695
|
-
assert res is not None
|
|
696
|
-
|
|
697
667
|
# Handle response
|
|
698
668
|
print(res)
|
|
699
669
|
|
|
@@ -803,8 +773,6 @@ with Mistral(
|
|
|
803
773
|
|
|
804
774
|
res = mistral.models.list()
|
|
805
775
|
|
|
806
|
-
assert res is not None
|
|
807
|
-
|
|
808
776
|
# Handle response
|
|
809
777
|
print(res)
|
|
810
778
|
|
|
@@ -92,9 +92,7 @@ with Mistral(
|
|
|
92
92
|
"content": "Who is the best French painter? Answer in one short sentence.",
|
|
93
93
|
"role": "user",
|
|
94
94
|
},
|
|
95
|
-
])
|
|
96
|
-
|
|
97
|
-
assert res is not None
|
|
95
|
+
], stream=False)
|
|
98
96
|
|
|
99
97
|
# Handle response
|
|
100
98
|
print(res)
|
|
@@ -119,9 +117,7 @@ async def main():
|
|
|
119
117
|
"content": "Who is the best French painter? Answer in one short sentence.",
|
|
120
118
|
"role": "user",
|
|
121
119
|
},
|
|
122
|
-
])
|
|
123
|
-
|
|
124
|
-
assert res is not None
|
|
120
|
+
], stream=False)
|
|
125
121
|
|
|
126
122
|
# Handle response
|
|
127
123
|
print(res)
|
|
@@ -147,8 +143,6 @@ with Mistral(
|
|
|
147
143
|
"content": open("example.file", "rb"),
|
|
148
144
|
})
|
|
149
145
|
|
|
150
|
-
assert res is not None
|
|
151
|
-
|
|
152
146
|
# Handle response
|
|
153
147
|
print(res)
|
|
154
148
|
```
|
|
@@ -172,8 +166,6 @@ async def main():
|
|
|
172
166
|
"content": open("example.file", "rb"),
|
|
173
167
|
})
|
|
174
168
|
|
|
175
|
-
assert res is not None
|
|
176
|
-
|
|
177
169
|
# Handle response
|
|
178
170
|
print(res)
|
|
179
171
|
|
|
@@ -198,9 +190,7 @@ with Mistral(
|
|
|
198
190
|
"content": "Who is the best French painter? Answer in one short sentence.",
|
|
199
191
|
"role": "user",
|
|
200
192
|
},
|
|
201
|
-
], agent_id="<
|
|
202
|
-
|
|
203
|
-
assert res is not None
|
|
193
|
+
], agent_id="<id>", stream=False)
|
|
204
194
|
|
|
205
195
|
# Handle response
|
|
206
196
|
print(res)
|
|
@@ -225,9 +215,7 @@ async def main():
|
|
|
225
215
|
"content": "Who is the best French painter? Answer in one short sentence.",
|
|
226
216
|
"role": "user",
|
|
227
217
|
},
|
|
228
|
-
], agent_id="<
|
|
229
|
-
|
|
230
|
-
assert res is not None
|
|
218
|
+
], agent_id="<id>", stream=False)
|
|
231
219
|
|
|
232
220
|
# Handle response
|
|
233
221
|
print(res)
|
|
@@ -251,9 +239,7 @@ with Mistral(
|
|
|
251
239
|
res = mistral.embeddings.create(inputs=[
|
|
252
240
|
"Embed this sentence.",
|
|
253
241
|
"As well as this one.",
|
|
254
|
-
], model="
|
|
255
|
-
|
|
256
|
-
assert res is not None
|
|
242
|
+
], model="mistral-embed")
|
|
257
243
|
|
|
258
244
|
# Handle response
|
|
259
245
|
print(res)
|
|
@@ -276,9 +262,7 @@ async def main():
|
|
|
276
262
|
res = await mistral.embeddings.create_async(inputs=[
|
|
277
263
|
"Embed this sentence.",
|
|
278
264
|
"As well as this one.",
|
|
279
|
-
], model="
|
|
280
|
-
|
|
281
|
-
assert res is not None
|
|
265
|
+
], model="mistral-embed")
|
|
282
266
|
|
|
283
267
|
# Handle response
|
|
284
268
|
print(res)
|
|
@@ -480,9 +464,7 @@ with Mistral(
|
|
|
480
464
|
"content": "Who is the best French painter? Answer in one short sentence.",
|
|
481
465
|
"role": "user",
|
|
482
466
|
},
|
|
483
|
-
])
|
|
484
|
-
|
|
485
|
-
assert res is not None
|
|
467
|
+
], stream=True)
|
|
486
468
|
|
|
487
469
|
with res as event_stream:
|
|
488
470
|
for event in event_stream:
|
|
@@ -519,8 +501,6 @@ with Mistral(
|
|
|
519
501
|
"content": open("example.file", "rb"),
|
|
520
502
|
})
|
|
521
503
|
|
|
522
|
-
assert res is not None
|
|
523
|
-
|
|
524
504
|
# Handle response
|
|
525
505
|
print(res)
|
|
526
506
|
|
|
@@ -545,8 +525,6 @@ with Mistral(
|
|
|
545
525
|
res = mistral.models.list(,
|
|
546
526
|
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
|
|
547
527
|
|
|
548
|
-
assert res is not None
|
|
549
|
-
|
|
550
528
|
# Handle response
|
|
551
529
|
print(res)
|
|
552
530
|
|
|
@@ -565,8 +543,6 @@ with Mistral(
|
|
|
565
543
|
|
|
566
544
|
res = mistral.models.list()
|
|
567
545
|
|
|
568
|
-
assert res is not None
|
|
569
|
-
|
|
570
546
|
# Handle response
|
|
571
547
|
print(res)
|
|
572
548
|
|
|
@@ -608,8 +584,6 @@ with Mistral(
|
|
|
608
584
|
|
|
609
585
|
res = mistral.models.list()
|
|
610
586
|
|
|
611
|
-
assert res is not None
|
|
612
|
-
|
|
613
587
|
# Handle response
|
|
614
588
|
print(res)
|
|
615
589
|
|
|
@@ -646,8 +620,6 @@ with Mistral(
|
|
|
646
620
|
|
|
647
621
|
res = mistral.models.list()
|
|
648
622
|
|
|
649
|
-
assert res is not None
|
|
650
|
-
|
|
651
623
|
# Handle response
|
|
652
624
|
print(res)
|
|
653
625
|
|
|
@@ -667,8 +639,6 @@ with Mistral(
|
|
|
667
639
|
|
|
668
640
|
res = mistral.models.list()
|
|
669
641
|
|
|
670
|
-
assert res is not None
|
|
671
|
-
|
|
672
642
|
# Handle response
|
|
673
643
|
print(res)
|
|
674
644
|
|
|
@@ -778,8 +748,6 @@ with Mistral(
|
|
|
778
748
|
|
|
779
749
|
res = mistral.models.list()
|
|
780
750
|
|
|
781
|
-
assert res is not None
|
|
782
|
-
|
|
783
751
|
# Handle response
|
|
784
752
|
print(res)
|
|
785
753
|
|
|
@@ -30,8 +30,7 @@ def get_model_info(model: str) -> Tuple[str, str]:
|
|
|
30
30
|
# if the model requiers the legacy fomat, use it, else do nothing.
|
|
31
31
|
if model in LEGACY_MODEL_ID_FORMAT:
|
|
32
32
|
return "-".join(model.split("-")[:-1]), LEGACY_MODEL_ID_FORMAT[model]
|
|
33
|
-
|
|
34
|
-
return model, model
|
|
33
|
+
return model, model
|
|
35
34
|
|
|
36
35
|
|
|
37
36
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "mistralai"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.4.0"
|
|
4
4
|
description = "Python Client SDK for the Mistral AI API."
|
|
5
5
|
authors = ["Mistral"]
|
|
6
6
|
readme = "README-PYPI.md"
|
|
@@ -19,7 +19,7 @@ include = ["py.typed", "src/mistralai/py.typed"]
|
|
|
19
19
|
in-project = true
|
|
20
20
|
|
|
21
21
|
[tool.poetry.dependencies]
|
|
22
|
-
python = "
|
|
22
|
+
python = ">=3.8"
|
|
23
23
|
eval-type-backport = ">=0.2.0"
|
|
24
24
|
httpx = ">=0.27.0"
|
|
25
25
|
jsonpath-python = ">=1.0.6"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from ._version import (
|
|
4
|
+
__title__,
|
|
5
|
+
__version__,
|
|
6
|
+
__openapi_doc_version__,
|
|
7
|
+
__gen_version__,
|
|
8
|
+
__user_agent__,
|
|
9
|
+
)
|
|
10
|
+
from .sdk import *
|
|
11
|
+
from .sdkconfiguration import *
|
|
12
|
+
from .models import *
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
VERSION: str = __version__
|
|
16
|
+
OPENAPI_DOC_VERSION = __openapi_doc_version__
|
|
17
|
+
SPEAKEASY_GENERATOR_VERSION = __gen_version__
|
|
18
|
+
USER_AGENT = __user_agent__
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "mistralai"
|
|
6
|
-
__version__: str = "1.
|
|
6
|
+
__version__: str = "1.4.0"
|
|
7
|
+
__openapi_doc_version__: str = "0.0.2"
|
|
8
|
+
__gen_version__: str = "2.493.32"
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 1.4.0 2.493.32 0.0.2 mistralai"
|
|
7
10
|
|
|
8
11
|
try:
|
|
9
12
|
if __package__ is not None:
|
|
@@ -43,11 +43,14 @@ class Agents(BaseSDK):
|
|
|
43
43
|
presence_penalty: Optional[float] = None,
|
|
44
44
|
frequency_penalty: Optional[float] = None,
|
|
45
45
|
n: OptionalNullable[int] = UNSET,
|
|
46
|
+
prediction: Optional[
|
|
47
|
+
Union[models.Prediction, models.PredictionTypedDict]
|
|
48
|
+
] = None,
|
|
46
49
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
47
50
|
server_url: Optional[str] = None,
|
|
48
51
|
timeout_ms: Optional[int] = None,
|
|
49
52
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
50
|
-
) ->
|
|
53
|
+
) -> models.ChatCompletionResponse:
|
|
51
54
|
r"""Agents Completion
|
|
52
55
|
|
|
53
56
|
:param messages: The prompt(s) to generate completions for, encoded as a list of dict with role and content.
|
|
@@ -62,6 +65,7 @@ class Agents(BaseSDK):
|
|
|
62
65
|
:param presence_penalty: 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.
|
|
63
66
|
:param frequency_penalty: 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.
|
|
64
67
|
:param n: Number of completions to return for each request, input tokens are only billed once.
|
|
68
|
+
:param prediction:
|
|
65
69
|
:param retries: Override the default retry configuration for this method
|
|
66
70
|
:param server_url: Override the default server URL for this method
|
|
67
71
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -93,6 +97,9 @@ class Agents(BaseSDK):
|
|
|
93
97
|
presence_penalty=presence_penalty,
|
|
94
98
|
frequency_penalty=frequency_penalty,
|
|
95
99
|
n=n,
|
|
100
|
+
prediction=utils.get_pydantic_model(
|
|
101
|
+
prediction, Optional[models.Prediction]
|
|
102
|
+
),
|
|
96
103
|
agent_id=agent_id,
|
|
97
104
|
)
|
|
98
105
|
|
|
@@ -138,13 +145,16 @@ class Agents(BaseSDK):
|
|
|
138
145
|
|
|
139
146
|
data: Any = None
|
|
140
147
|
if utils.match_response(http_res, "200", "application/json"):
|
|
141
|
-
return utils.unmarshal_json(
|
|
142
|
-
http_res.text, Optional[models.ChatCompletionResponse]
|
|
143
|
-
)
|
|
148
|
+
return utils.unmarshal_json(http_res.text, models.ChatCompletionResponse)
|
|
144
149
|
if utils.match_response(http_res, "422", "application/json"):
|
|
145
150
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
|
146
151
|
raise models.HTTPValidationError(data=data)
|
|
147
|
-
if utils.match_response(http_res,
|
|
152
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
153
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
154
|
+
raise models.SDKError(
|
|
155
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
156
|
+
)
|
|
157
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
148
158
|
http_res_text = utils.stream_to_text(http_res)
|
|
149
159
|
raise models.SDKError(
|
|
150
160
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
@@ -191,11 +201,14 @@ class Agents(BaseSDK):
|
|
|
191
201
|
presence_penalty: Optional[float] = None,
|
|
192
202
|
frequency_penalty: Optional[float] = None,
|
|
193
203
|
n: OptionalNullable[int] = UNSET,
|
|
204
|
+
prediction: Optional[
|
|
205
|
+
Union[models.Prediction, models.PredictionTypedDict]
|
|
206
|
+
] = None,
|
|
194
207
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
195
208
|
server_url: Optional[str] = None,
|
|
196
209
|
timeout_ms: Optional[int] = None,
|
|
197
210
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
198
|
-
) ->
|
|
211
|
+
) -> models.ChatCompletionResponse:
|
|
199
212
|
r"""Agents Completion
|
|
200
213
|
|
|
201
214
|
:param messages: The prompt(s) to generate completions for, encoded as a list of dict with role and content.
|
|
@@ -210,6 +223,7 @@ class Agents(BaseSDK):
|
|
|
210
223
|
:param presence_penalty: 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.
|
|
211
224
|
:param frequency_penalty: 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.
|
|
212
225
|
:param n: Number of completions to return for each request, input tokens are only billed once.
|
|
226
|
+
:param prediction:
|
|
213
227
|
:param retries: Override the default retry configuration for this method
|
|
214
228
|
:param server_url: Override the default server URL for this method
|
|
215
229
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -241,6 +255,9 @@ class Agents(BaseSDK):
|
|
|
241
255
|
presence_penalty=presence_penalty,
|
|
242
256
|
frequency_penalty=frequency_penalty,
|
|
243
257
|
n=n,
|
|
258
|
+
prediction=utils.get_pydantic_model(
|
|
259
|
+
prediction, Optional[models.Prediction]
|
|
260
|
+
),
|
|
244
261
|
agent_id=agent_id,
|
|
245
262
|
)
|
|
246
263
|
|
|
@@ -286,13 +303,16 @@ class Agents(BaseSDK):
|
|
|
286
303
|
|
|
287
304
|
data: Any = None
|
|
288
305
|
if utils.match_response(http_res, "200", "application/json"):
|
|
289
|
-
return utils.unmarshal_json(
|
|
290
|
-
http_res.text, Optional[models.ChatCompletionResponse]
|
|
291
|
-
)
|
|
306
|
+
return utils.unmarshal_json(http_res.text, models.ChatCompletionResponse)
|
|
292
307
|
if utils.match_response(http_res, "422", "application/json"):
|
|
293
308
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
|
294
309
|
raise models.HTTPValidationError(data=data)
|
|
295
|
-
if utils.match_response(http_res,
|
|
310
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
311
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
312
|
+
raise models.SDKError(
|
|
313
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
314
|
+
)
|
|
315
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
296
316
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
297
317
|
raise models.SDKError(
|
|
298
318
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
@@ -339,11 +359,14 @@ class Agents(BaseSDK):
|
|
|
339
359
|
presence_penalty: Optional[float] = None,
|
|
340
360
|
frequency_penalty: Optional[float] = None,
|
|
341
361
|
n: OptionalNullable[int] = UNSET,
|
|
362
|
+
prediction: Optional[
|
|
363
|
+
Union[models.Prediction, models.PredictionTypedDict]
|
|
364
|
+
] = None,
|
|
342
365
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
343
366
|
server_url: Optional[str] = None,
|
|
344
367
|
timeout_ms: Optional[int] = None,
|
|
345
368
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
346
|
-
) ->
|
|
369
|
+
) -> eventstreaming.EventStream[models.CompletionEvent]:
|
|
347
370
|
r"""Stream Agents completion
|
|
348
371
|
|
|
349
372
|
Mistral AI provides the ability to stream responses back to a client in order to allow partial results for certain requests. Tokens will be sent as data-only server-sent 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.
|
|
@@ -360,6 +383,7 @@ class Agents(BaseSDK):
|
|
|
360
383
|
:param presence_penalty: 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.
|
|
361
384
|
:param frequency_penalty: 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.
|
|
362
385
|
:param n: Number of completions to return for each request, input tokens are only billed once.
|
|
386
|
+
:param prediction:
|
|
363
387
|
:param retries: Override the default retry configuration for this method
|
|
364
388
|
:param server_url: Override the default server URL for this method
|
|
365
389
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -391,6 +415,9 @@ class Agents(BaseSDK):
|
|
|
391
415
|
presence_penalty=presence_penalty,
|
|
392
416
|
frequency_penalty=frequency_penalty,
|
|
393
417
|
n=n,
|
|
418
|
+
prediction=utils.get_pydantic_model(
|
|
419
|
+
prediction, Optional[models.Prediction]
|
|
420
|
+
),
|
|
394
421
|
agent_id=agent_id,
|
|
395
422
|
)
|
|
396
423
|
|
|
@@ -446,7 +473,12 @@ class Agents(BaseSDK):
|
|
|
446
473
|
http_res_text = utils.stream_to_text(http_res)
|
|
447
474
|
data = utils.unmarshal_json(http_res_text, models.HTTPValidationErrorData)
|
|
448
475
|
raise models.HTTPValidationError(data=data)
|
|
449
|
-
if utils.match_response(http_res,
|
|
476
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
477
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
478
|
+
raise models.SDKError(
|
|
479
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
480
|
+
)
|
|
481
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
450
482
|
http_res_text = utils.stream_to_text(http_res)
|
|
451
483
|
raise models.SDKError(
|
|
452
484
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
@@ -493,11 +525,14 @@ class Agents(BaseSDK):
|
|
|
493
525
|
presence_penalty: Optional[float] = None,
|
|
494
526
|
frequency_penalty: Optional[float] = None,
|
|
495
527
|
n: OptionalNullable[int] = UNSET,
|
|
528
|
+
prediction: Optional[
|
|
529
|
+
Union[models.Prediction, models.PredictionTypedDict]
|
|
530
|
+
] = None,
|
|
496
531
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
497
532
|
server_url: Optional[str] = None,
|
|
498
533
|
timeout_ms: Optional[int] = None,
|
|
499
534
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
500
|
-
) ->
|
|
535
|
+
) -> eventstreaming.EventStreamAsync[models.CompletionEvent]:
|
|
501
536
|
r"""Stream Agents completion
|
|
502
537
|
|
|
503
538
|
Mistral AI provides the ability to stream responses back to a client in order to allow partial results for certain requests. Tokens will be sent as data-only server-sent 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.
|
|
@@ -514,6 +549,7 @@ class Agents(BaseSDK):
|
|
|
514
549
|
:param presence_penalty: 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
550
|
:param frequency_penalty: 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.
|
|
516
551
|
:param n: Number of completions to return for each request, input tokens are only billed once.
|
|
552
|
+
:param prediction:
|
|
517
553
|
:param retries: Override the default retry configuration for this method
|
|
518
554
|
:param server_url: Override the default server URL for this method
|
|
519
555
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -545,6 +581,9 @@ class Agents(BaseSDK):
|
|
|
545
581
|
presence_penalty=presence_penalty,
|
|
546
582
|
frequency_penalty=frequency_penalty,
|
|
547
583
|
n=n,
|
|
584
|
+
prediction=utils.get_pydantic_model(
|
|
585
|
+
prediction, Optional[models.Prediction]
|
|
586
|
+
),
|
|
548
587
|
agent_id=agent_id,
|
|
549
588
|
)
|
|
550
589
|
|
|
@@ -600,7 +639,12 @@ class Agents(BaseSDK):
|
|
|
600
639
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
601
640
|
data = utils.unmarshal_json(http_res_text, models.HTTPValidationErrorData)
|
|
602
641
|
raise models.HTTPValidationError(data=data)
|
|
603
|
-
if utils.match_response(http_res,
|
|
642
|
+
if utils.match_response(http_res, "4XX", "*"):
|
|
643
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
644
|
+
raise models.SDKError(
|
|
645
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
|
646
|
+
)
|
|
647
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
604
648
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
605
649
|
raise models.SDKError(
|
|
606
650
|
"API error occurred", http_res.status_code, http_res_text, http_res
|