LLM plugin providing access to Mistral models busing the Mistral API
Project description
llm-mistral
LLM plugin providing access to Mistral models using the Mistral API
Installation
Install this plugin in the same environment as LLM:
llm install llm-mistral
Usage
First, obtain an API key for the Mistral API.
Configure the key using the llm keys set mistral command:
llm keys set mistral
<paste key here>
You can now access the three Mistral hosted models: mistral-tiny, mistral-small and mistral-medium.
To run a prompt through mistral-tiny:
llm -m mistral-tiny 'A sassy name for a pet sasquatch'
To start an interactive chat session with mistral-small:
llm chat -m mistral-small
Chatting with mistral-small
Type 'exit' or 'quit' to exit
Type '!multi' to enter multiple lines, then '!end' to finish
> three proud names for a pet walrus
1. "Nanuq," the Inuit word for walrus, which symbolizes strength and resilience.
2. "Sir Tuskalot," a playful and regal name that highlights the walrus' distinctive tusks.
3. "Glacier," a name that reflects the walrus' icy Arctic habitat and majestic presence.
To use a system prompt with mistral-medium to explain some code:
cat example.py | llm -m mistral-medium -s 'explain this code'
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd llm-mistral
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
llm install -e '.[test]'
To run the tests:
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm-mistral-0.1.tar.gz.
File metadata
- Download URL: llm-mistral-0.1.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ddf36158330b405f81ba392ef890a29f2c63e11d23bafe926fa617965cb6943
|
|
| MD5 |
1f6464e65eb3d89ba0d8d9e0c764862a
|
|
| BLAKE2b-256 |
995e2aa7b46363b554e32937b4b4e871fa86acab20d435392b895f87d0da5e91
|
File details
Details for the file llm_mistral-0.1-py3-none-any.whl.
File metadata
- Download URL: llm_mistral-0.1-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92d9dd7f2636daa39643594c95d0b82fc336024d5491eacfb35b31c2db744324
|
|
| MD5 |
ccf459bdfc2afa264af561cf0c9caaf9
|
|
| BLAKE2b-256 |
680f24244887eb8e77d3c4b8e7c786f7559dc9a0016c598d2b43dba39ba08dbb
|