PromptDesk python SDK.
Project description
What is PromptDesk?
PromptDesk is 100% free and open-source tool designed to facilitate the creation, organization, integration, and evaluation of prompts, prompt-based applications and Large Language Models (LLMs).
PrompDesk Manager
The PromptDesk GUI is an OpenAI playground clone that makes it easy to build and organize prompt-based applications.
- Workspace: Build and test completion, code and chat prompts with variables.
- Prompts: Create and organize prompts.
- Models: Create, edit, test and add unlimited LLM models.
- Logs: View, analyze and export prompt calls.
- Settings: Configure variables and API keys.
PromptDesk Python SDK
The PrompDesk Python PIP Package is an ultra-lightweight library to call and process prompts remotely or locally.
- Generate: Call prompts remotely or locally.
- JSON: Convert prompts to JSON format.
- Variables: Add variables to prompts.
- Data validation: Validate prompt data.
We recommend starting with the Quickstart guide. You can also jump straight to the Build Prompts or start integrating prompts in python with Integrate Prompts guides.
Quickstart
Install PromptDesk
To install PromptDesk, use pip:
pip install promptdesk
Usage
You can call the prompt you build in the application by using the generate method.
from promptdesk import PromptDesk
pd = PromptDesk(
#defaults to os.environ.get("PROMPTDESK_API_KEY")
api_key = "YOUR_PROMPTDESK_API_KEY"
)
story = pd.generate("short-story", {
"setting": "dark and stormy night",
"character": "lonely farmer",
"plot": "visited by a stranger"
})
print(story)
You can find your API key in the application under Organization Information > API Key.
Troubleshooting
Testing the Service
You can test the service endpoint by pinging it:
print(pd.ping())
A successful ping will return "pong".
Prompt name
The prompt name you use in the generate method must match the name of the prompt you created in the application.
Logs
You can view the logs of your prompt calls in the application. If you are having trouble, check the logs to see if there are any errors.
Important Links
For more information about PromptDesk, please refer to the following resources:
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
Hashes for promptdesk-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e706a8c5dd743f17f26e4076c0a93ea97e1b7399c8173988b5d2a6899ffb1a1 |
|
MD5 | 222bee59fe80ee026c28ab85941045c1 |
|
BLAKE2b-256 | 7b98733ade4efa630982a55c667e583c211fc851ac8e7148aab7ac7d05be1ea9 |