Metadata-Version: 2.1
Name: promptwiz
Version: 0.0.5
Summary: PromptWiz API
Home-page: 
Author: PromptWiz
Author-email: contact@promptwiz.co.uk
License: Apache 2.0
Keywords: PromptWiz,PromptWiz API
Description-Content-Type: text/markdown
Requires-Dist: requests
Requires-Dist: httpx

# 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](https://promptwiz.co.uk/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](https://promptwiz.co.uk/docs/) page 

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) 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:

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

Then import the package:
```python
import promptwiz
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python
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:
<a id="apiKey"></a>
### apiKey

- **Type**: API key
- **API key parameter name**: apiKey
- **Location**: HTTP header


## Author

contact@promptwiz.co.uk


