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.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d005f0b667a2f5d79f3db4ffafb48c7c0ba1a76970cc3e7203405e1395131ee3 |
|
MD5 | 7e823329c019e0f29fd74953d64fd6f2 |
|
BLAKE2b-256 | da5cdb07a8b8e09b2eeff8df04dfd63487c7279cb8edebd4c970f56a8396cb12 |