Skip to main content

PromptDesk python SDK.

Project description

Alt Text License: AGPL v3 Docker PyPI version

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).

Alt Text

PrompDesk Python PIP Package

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.

PrompDesk GUI

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.

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 = promptdesk.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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

promptdesk-0.1.9.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

promptdesk-0.1.9-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page