Optimus Prompt 🤖
Compare responses from different Language Learning Models (LLMs) to the same prompt.
Features
- Support for multiple LLM providers:
- OpenAI (GPT-3.5, GPT-4)
- Anthropic (Claude)
- Simple prompt input via text file
- Human-readable output format
- Easy to extend with new providers
Installation
pip install optimus-prompt
Quick Start
- Create a
prompt.txtfile with your prompt:
Explain quantum computing in simple terms
- Set up your API keys in a
.envfile:
OPENAI_API_KEY=your_openai_key_here
ANTHROPIC_API_KEY=your_anthropic_key_here
- Run Prompt Prism:
from optimus_prompt.core import Prompt
from optimus_prompt.providers import OpenAIProvider, AnthropicProvider
from optimus_prompt.core import ResponseWriter
# Initialize providers
providers = [
OpenAIProvider(model="gpt-4"),
AnthropicProvider(model="claude-3")
]
# Read prompt from file
with open("prompt.txt", "r") as f:
prompt_text = f.read().strip()
prompt = Prompt(prompt_text)
# Collect responses
responses = []
for provider in providers:
response = provider.generate(prompt)
responses.append(response)
# Write responses to file
writer = ResponseWriter("output.txt")
writer.write(prompt, responses)
Development
Setup
- Clone the repository:
git clone https://github.com/yourusername/optimus-prompt.git
cd optimus-prompt
- Install Poetry (if not already installed):
pip install poetry
- Install dependencies:
poetry install
Running Tests
poetry run pytest
Contributing
We welcome contributions! Please see our Contributing Guide for details.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for optimus-prompt 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| optimus_prompt-0.1.0.tar.gz | 16.6 kB | Without provenance | Details for optimus_prompt-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| optimus_prompt-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for optimus_prompt-0.1.0-py3-none-any.whl |
Total release size: 26.7 kB
Release files / optimus_prompt-0.1.0.tar.gz
| Download URL | optimus_prompt-0.1.0.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4bf277843c9e92abc7f7f5a9dfec3b906fe18940719ae2b21e9cc52b27dc0c9c
|
|
BLAKE2b-256 checksum How to use checksums |
a975233f2ff572d76138f67522925c98b8cc124b6f6f3b5a6e794f1d0b6cfbe6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.3 Linux/6.11.0-24-generic
|
Release files / optimus_prompt-0.1.0-py3-none-any.whl
| Download URL | optimus_prompt-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00c9cdb0037d209b22c4fb1025bba1dd86f584a7701cf63eb765e5814187f0a9
|
|
BLAKE2b-256 checksum How to use checksums |
c122400256cba084603d096c2132f49089f5212b4dfd42692062a0316c0351e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.3 Linux/6.11.0-24-generic
|
Security for optimus-prompt 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.