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
  • Class: VYSPClient
  • Methods
  • Exceptions
  • AuthenticationError
  • NotFoundError
  • BadRequestError
  • ApiError
  1. Python Client

Documentation for Python Client Library Functions and Classes

Class: VYSPClient

Methods

__init__(self, tenant_api_key, gate_api_key, installation_type="cloud", installation_url=None)

Initializes the VYSPClient.

  • tenant_api_key (str): API key for the tenant.

  • gate_api_key (str): API key for the gate.

  • installation_type (str, optional): Type of installation. Defaults to "cloud". Don't change this if you don't need to.

  • installation_url (str, optional): The base URL of the API if not using the default cloud setup.

check_input(self, client_ref_user_id, prompt, internal=False, metadata=None)

Performs an input check.

  • client_ref_user_id (str): The user's identifier. You can use this attribute to correlate users of your application with logs in VYSP.AI

  • prompt (str): The input data from the user to check.

  • client_ref_internal (bool, optional): Specifies if the input is internal. You can use this attribute to correlate users of your application with logs in VYSP.AI

  • metadata (dict, optional): Additional data related to the check. If you have any extra metadata to send with the check_input request for later use, utilize this attribute.

check_output(self, client_ref_user_id, prompt, model_output, internal=False, metadata=None)

Performs an output check.

  • client_ref_user_id (str): The user's identifier.

  • prompt (str): The input data from the user that was used in the check_input function call.

  • model_output (str): The output of the model to check.

  • client_ref_internal (bool, optional): Specifies if the output is internal.

  • metadata (dict, optional): Additional data related to the check.

Exceptions

AuthenticationError

Raised when there is an issue with API authentication.

NotFoundError

Raised when a requested resource is not found.

BadRequestError

Raised when there is a bad request.

ApiError

General API error.

PreviousDemo Project (Flask/Python)NextTS/JS Client Library for VYSP.AI API

Last updated 1 year ago