A command-line utility for quickly testing and interacting with various LLM APIs.
Project description
OmniPrompt
OmniPrompt is a command-line utility for quickly testing and interacting with various large language model (LLM) APIs from different providers. "Omni" reflects the tool's ability to connect to all different AI providers, and "Prompt" is the core action.
Features
- Test prompts against multiple AI providers from a single interface.
- Support for major providers: Google, OpenAI, Anthropic, Groq, and more.
- List available models for each provider.
- Generate images using Google's Imagen model.
- Run a single prompt against all configured providers simultaneously.
- Secure and discoverable API key configuration using environment variables.
Setup
-
Clone the repository:
git clone https://github.com/andkamau/omniprompt.git cd omniprompt
-
Install the package: You can install OmniPrompt in editable mode for development:
pip install -e .
This will install all dependencies and create the
omnipromptcommand. -
Configure API Keys: OmniPrompt reads API keys from environment variables. It looks for a
config.yamlfile in the following locations:~/.config/omniprompt/config.yaml~/.omniprompt.yaml- The current directory (
./config.yaml)
Step 1: Create your config file Copy the provided
config.yamlto one of the locations above.Step 2: Set the Environment Variables Set the environment variables with your actual API keys as defined in your
config.yaml.Example:
export OPENAI_API_KEY="sk-..." export GOOGLE_API_KEY="AIza..."
Usage
Once installed, you can use the omniprompt command from anywhere.
Basic Prompt
omniprompt -P openai -m gpt-4o -p "What are the three laws of thermodynamics?"
List Available Models
omniprompt -l google
Image Generation
omniprompt -P google -i "A futuristic cityscape at sunset, digital art."
Test All Providers
python omniprompt.py -a -p "Write a haiku about a robot learning to paint."
Arguments
| Full Argument | Short Argument | Description |
|---|---|---|
--provider |
-P |
The API provider (e.g., google, openai). |
--model |
-m |
The specific model to use (e.g., gpt-4o). |
--prompt |
-p |
The text prompt to send to the model. |
--list-models |
-l |
List available models for a given provider. |
--generate-image |
-i |
The prompt for image generation. |
--all-providers |
-a |
A flag to send a prompt to all configured providers. |
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 omniprompt-1.0.0.tar.gz.
File metadata
- Download URL: omniprompt-1.0.0.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd66ca68e0b58c8e4b0554ac3fad3f7010fc611fd73646e924bb000698fb8658
|
|
| MD5 |
e8cde4e3fdf94aad2b2831fa2e5aa707
|
|
| BLAKE2b-256 |
48a7a13591de558197f82969f1ad51623786b08f23d6cf663764f1cf19e53cdc
|
File details
Details for the file omniprompt-1.0.0-py3-none-any.whl.
File metadata
- Download URL: omniprompt-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21b00a719cc7df0b76a22a7486d4d7c9cab4b037be8485c87c8448e71210360e
|
|
| MD5 |
2fa73428b37ac08deb648640360422f7
|
|
| BLAKE2b-256 |
0d46a9f8815d0ff58c8779cf71dc96d3e679fe8d638e394b754423c5a3375369
|