VYSP.AI Product Documentation
VYSP.AI Homepage
  • Welcome to our Documentation!
  • VYSP.AI Security Platform and API Usage Documentation
  • Basic Concepts of VYSP.AI Security API
  • Get started
    • Rules
    • Flows
    • Gates
    • Knowledge Databases
  • Using the platform
  • SSO Authentication
  • Python Client
    • Python Client Library for VYSP API
    • Quick Setup with Python Client Library
    • Demo Project (Flask/Python)
    • Documentation for Python Client Library Functions and Classes
  • TypeScript/JS Client
    • TS/JS Client Library for VYSP.AI API
    • Quick Setup with TS/JS Client Library
    • Demo Project (Next.JS)
    • Documentation for TypeScript Client Library Functions and Classes
  • JavaScript Client
    • JavaScript Client Library for VYSP API
    • Quick Setup with JavaScript Client Library
    • Demo Project (Next.JS)
    • Documentation for JavaScript Client Library Functions and Classes
Powered by GitBook
On this page
  • Installation
  • Basic Usage
  1. Python Client

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.

PreviousPython Client Library for VYSP APINextDemo Project (Flask/Python)

Last updated 1 year ago