Prompt Wrangler
A Python wrapper for the Prompt Wrangler REST API.
Easily integrate large language models (LLMs) into your app with Prompt Wrangler! Prompt Wrangler makes it simple to incorporate LLMs into your application and enhance your prompts without updating your code. Best of all, it's 100% free!
Installation
Install the package using pip:
pip install prompt-wrangler
Environment Variables
Before you need to set environment variables.
If you want to use private prompts from your workspace you should set:
PROMPT_WRANGLER_API_KEY=<your_api_key>
If you want to use public prompts from the community you should set:
OPENAI_API_KEY=<open_ai_api_key>
Note that if you set your
PROMPT_WRANGLER_API_KEYyou don't need to setOPENAI_API_KEYas it will be used as a fallback.
Usage
from prompt_wrangler import PromptWrangler
# Create a PromptWrangler instance
pw = PromptWrangler()
# Get a prompt
prompt_path = "my-workspace/my-prompt-slug"
prompt = prompt_wrangler.prompt(prompt_path)
# Run the prompt
args = {'input_text': 'some input'}
result = prompt.run(args=args)
prediction = result.prediction
License
This project is licensed under the MIT License.
Local Development
Publish
Run. Username is exit38
./publish.sh
Metadata
Release files for prompt-wrangler 0.5.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 | |
|---|---|---|---|
| prompt_wrangler-0.5.0.tar.gz | 6.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| prompt_wrangler-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.2 kB
Release files / prompt_wrangler-0.5.0.tar.gz
| Download URL | prompt_wrangler-0.5.0.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b24efb04baca6549ac2b43559ecc6459c9b2b0fa62983886b52fc59dec6b97d
|
|
BLAKE2b-256 checksum How to use checksums |
14e7e33b5af8603a2af4071eabf4651ba58c6fc63a0d7775d57e6e5d6e4fc693
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.0
|
Release files / prompt_wrangler-0.5.0-py3-none-any.whl
| Download URL | prompt_wrangler-0.5.0-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e832a2994a7795597c335f0e0b7e61c7ecb6d4f7d150c2f67ac7bdd00b604ee
|
|
BLAKE2b-256 checksum How to use checksums |
cdc0ca2df87cbbe5479c9a93fc8a61c3dcbd25e6358df5aa37d465e1a12ff15e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.0
|