This release is a pre-release and may not be stable for production use.
Mistral Python Client
Mitta Build
NOTE: This fork will track with Mistral's client library until that library is updated with a newer dependency for httpx. This library allows httpx version >= 0.27.0. No other changes, other than import names, have been made to this library. This library has been tested for embeddings and chat completions.
The source code is located here. This is NOT a client library for Mitta.
Carry On
This client is inspired from cohere-python
You can use the Mistral Python client to interact with the Mistral AI API.
Installing
pip install mitta_mistralai
From Source
This client uses poetry as a dependency and virtual environment manager.
You can install poetry with
pip install poetry
poetry will set up a virtual environment and install dependencies with the following command:
poetry install
Run examples
You can run the examples in the examples/ directory using poetry run or by entering the virtual environment using poetry shell.
API Key Setup
Running the examples requires a Mistral AI API key.
- Get your own Mistral API Key: https://docs.mistral.ai/#api-access
- Set your Mistral API Key as an environment variable. You only need to do this once.
# set Mistral API Key (using zsh for example)
$ echo 'export MISTRAL_API_KEY=[your_key_here]' >> ~/.zshenv
# reload the environment (or just quit and open a new terminal)
$ source ~/.zshenv
Using poetry run
cd examples
poetry run python chat_no_streaming.py
Using poetry shell
poetry shell
cd examples
>> python chat_no_streaming.py
Metadata
Release files for mitta_mistralai 0.1.3b2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mitta_mistralai-0.1.3b2.tar.gz | 12.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mitta_mistralai-0.1.3b2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.3 kB
Release files / mitta_mistralai-0.1.3b2.tar.gz
| Download URL | mitta_mistralai-0.1.3b2.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
936a14cf535f91adfad6efcd20e18de425333712345fbba283ee0499896d7d12
|
|
BLAKE2b-256 checksum How to use checksums |
1473191f5d7f7c70d23ab559eb0d712fcfbe27ff4da99030e92ed5b4957dc026
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.10.13 Windows/10
|
Release files / mitta_mistralai-0.1.3b2-py3-none-any.whl
| Download URL | mitta_mistralai-0.1.3b2-py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
670df2a48a8ebe4a13062fd67746000dc3280866f6ecd4de934854b9ca2cb60a
|
|
BLAKE2b-256 checksum How to use checksums |
e72ddf0e527f3826f3254eab898e7495480dd165761899ff816af56147ff8385
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.10.13 Windows/10
|