Quick Setup with Python Client Library
Getting started with the Python Client Library for VYSP API is straightforward. Follow these steps to set up the library in your project.
Installation
First, install the library using pip:
pip install vysp-python
Basic Usage
Here's a quick example to show you how to perform an input check using the library:
from vysp import VYSPClient
# Initialize the client
client = VYSPClient(tenant_api_key='your_tenant_key', gate_api_key='your_gate_key')
prompt = 'What is VYSP.AI?'
# Perform an input check
input_response = client.check_input(client_ref_user_id='123', prompt=prompt)
print(response)
model_output = 'VYSP.AI is a product that allows you to configure AI guardrails easier.'
# Perform an output check
output_response = client.check_output(client_ref_user_id='123', prompt=prompt, model_output=model_output)
print(response)
Replace 'your_tenant_key' and 'your_gate_key' with your actual API keys.
Last updated