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)
__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)
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)
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
AuthenticationError
Raised when there is an issue with API authentication.
NotFoundError
NotFoundError
Raised when a requested resource is not found.
BadRequestError
BadRequestError
Raised when there is a bad request.
ApiError
ApiError
General API error.
Last updated