Run prompts against LLMs hosted by Inception Labs with diffusing animation
Project description
llm-inception
Run prompts against LLMs hosted by Inception Labs with support for their unique diffusing animation feature.
Installation
Install this plugin in the same environment as LLM.
llm install llm-inception
This plugin uses Rich to display diffusing animations.
Usage
First, obtain an API key for Inception Labs and set it using the llm command-line tool:
llm keys set inception
# Paste your INCEPTION_API_KEY here
Alternatively, the plugin will use the LLM_INCEPTION_KEY environment variable if set.
Available Models
To see a list of available Inception Labs models that llm can use, run:
llm models list
The list of models is fetched from the API and cached. You can refresh this cache by running:
llm inception refresh
To see the detailed JSON information for all cached Inception Labs models:
llm inception models
Running Prompts
Run prompts against Inception Labs models like this:
llm -m inception/mercury-coder-small "Tell me a short story about a brave avocado."
Diffusing Animation
This plugin supports Inception Labs' "diffusing" feature, which shows an animation as the model generates its response. This is enabled by default when using the plugin in an interactive terminal.
Example:
llm chat -m inception/mercury-coder-small
> Write a haiku about a robot falling in love.
(Animation will play here)
Whispering wind chills,
Leaves dance under moonlit sky,
Night's soft embrace holds.
>
You can control this feature using the -o no_diffusion true option (note the underscore):
llm -m inception/mercury-coder-small "Why is the sky blue?" -o no_diffusion true
Other model options like max_tokens can also be set:
llm -m inception/mercury-coder-small "Explain quantum entanglement simply." -o max_tokens 150
Development
To set up this plugin locally, first check out the code. Then create a new virtual environment:
cd llm-inception
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests (you'll need to create some!):
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_inception-0.2.1.tar.gz.
File metadata
- Download URL: llm_inception-0.2.1.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7183d4cc861b9689423951f9a3ea5d0d5a5ce82ff1bef23fd1ca889460f91a15
|
|
| MD5 |
5947165b932ee026343048bc937816fa
|
|
| BLAKE2b-256 |
6b081aec1c4f888b5e8f2625985fc7f98f7f9239e1800f6e6664364e16954bcc
|
File details
Details for the file llm_inception-0.2.1-py3-none-any.whl.
File metadata
- Download URL: llm_inception-0.2.1-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
691c6bd00604e1fe2859da2cf515d927c8e4b3bdf7d6322d7dec464f0a74028f
|
|
| MD5 |
0ede95b7d7b2f1b262639d09a88b6a3a
|
|
| BLAKE2b-256 |
5b93d0672267e3e83e8b89e79472c684ebbaf0853e2c7185dca5e165b3f6ad99
|