Skip to main content

PromptWiz API

Project description

promptwiz

Context

The PromptWiz API provides a way to execute prompt templates built in the UI. The API will populate the prompt variables with your inputs, query the model then return the results. The results for API requests will be stored in PromptWiz for the purpose of analysis.

Pre-requisites

  1. Create a prompt
  2. Create a version of the prompt (and save it)
  3. Activate the prompt version - the version's status should be ‘Active’
  4. Set the API Key for the model service (e.g. OpenAI) used by the prompt in the API keys page, or alternatively pass the model service API key on every query in an API request using the modelApiKey field
  5. Read about the API spec in the API docs page

This Python package is automatically generated by the OpenAPI Generator project:

  • PromptWiz API version: 0.1
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.7+

Installation & Usage

pip install

You can install directly using pip:

pip install promptwiz

(you may need to run pip with root permission: sudo pip install promptwiz)

Then import the package:

import promptwiz

Getting Started

Please follow the installation procedure and then run the following:

import promptwiz
from pprint import pprint


promptwiz.Api.api_key = os.environ["API_KEY"]

query_set = [
    promptwiz.Query(prompt_id=7, variables=dict(EXAMPLE_VARIABLE_1="VARIABLE 1 Value 1"), results_size=2),
    promptwiz.Query(prompt_id=8, variables=dict(EXAMPLE_VARIABLE_1="VARIABLE 1 Value 2", EXAMPLE_VARIABLE_2="VARIABLE 2 Value 2")),
]
results, errors, status_code = promptwiz.Api.evaluate(query_set=query_set)

print("The response of Api->evaluate:\n")
pprint(results)

Documentation for API Endpoints

All URIs are relative to https://app.promptwiz.co.uk/api/v0.1

Class Method HTTP request Description
Api evaluate POST /evaluate/

Authentication schemes defined for the API:

apiKey

  • Type: API key
  • API key parameter name: apiKey
  • Location: HTTP header

Author

contact@promptwiz.co.uk

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

promptwiz-0.0.5.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

promptwiz-0.0.5-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file promptwiz-0.0.5.tar.gz.

File metadata

  • Download URL: promptwiz-0.0.5.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for promptwiz-0.0.5.tar.gz
Algorithm Hash digest
SHA256 643664490653dccbfe329051a9a5a78e01a426d930a0a3f3068bf063a3126f01
MD5 27e84e56c77f8d79f7ad80a2db912a5a
BLAKE2b-256 4b9b438a343c21a259868ba152e7f3de8a13d85ec7523fcfb2753ac964a648d9

See more details on using hashes here.

File details

Details for the file promptwiz-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: promptwiz-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for promptwiz-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2321c11255257720e7e3af246ca814fbd41b56fd124d186f32e7fffc28ba0b7d
MD5 c621916800a652eb2fec93099539919c
BLAKE2b-256 ea8608bf86a31d3427ac95b6d95ee0d06d18477a016a004e39ec8ab7bbe06a07

See more details on using hashes here.

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