Using the platform
Getting Started with VYSP.AI API
Welcome to VYSP.AI, your trusted platform for AI security. This guide will help you get started with our API, walking you through the signup process, creating a gate, and using our Python library to protect a demo ChatGPT application.
To skip this tutorial and just get started with a demo project, check out the Python demo project here and the TypeScript/JavaScript demo project here.
Step 1: Sign Up
Visit our signup page: https://dashboard.vysp.ai/signup.
Fill in the required details: your name, email, password, and other necessary information.
Verify your email address through the link sent to your inbox.
Sign up for MFA with an authenticator application. All Tenant administrators are required to enable multi-factor authentication.
Log in to the dashboard using your newly created credentials.
Step 2: Creating a Gate
Once logged in, navigate to the Gates section: https://dashboard.vysp.ai/gates.
Click on "Create Gate".
Provide a name for your gate and click create.
Click on the Gate ID Link to view the details and modify the configuration.
Step 3: Adding Rules
Once you're on the Gate Detail page, click on "Add Rule" under the newly created Input Flow.
Click "Create Rule" at the top right of the modal display.
In the "Create Rule" modal, type "prompt_injection_rule" in the "Rule Name" text box, and select "Prompt Injection Detection" for "Rule Type".
Create the rule.
Step 4: Retrieve your keys!
Tenant and Gate API Keys allow you to use your new Gate to protect your AI application.
In the top right corner, click on the dropdown menu with your username.
Click the "Copy" button to copy your Tenant API Key. Save it someplace you'll remember!
On the Gate Detail Page, click the "Copy" button to copy your Gate API Key. Save this too!
Step 5: Using the Python Library
Installation
First, you need to install the VYSP.AI Python library. You can do this using pip:
Basic Usage
Here is an example of how to perform input and output checks using the library:
Replace 'your_tenant_key'
and 'your_gate_key'
with your actual API keys.
Protecting a Demo ChatGPT Application
Here is a step-by-step guide to integrating VYSP.AI with a ChatGPT application using the OpenAI Python library:
1. Import Necessary Libraries
2. Set Up Your OpenAI API Key and VYSP.AI API Key
Make sure you have your OpenAI API key and VYSP.AI API key ready.
3. Create a Function to Send Requests through VYSP.AI
Create a function that sends input and output through the VYSP.AI gate for validation.
4. Test the Integration
You can now test your integration by querying the OpenAI model:
This function first validates the input prompt with VYSP.AI. If the input is deemed safe, it proceeds to send the prompt to OpenAI's GPT-4o model. After receiving the response, it validates the output with VYSP.AI. If both input and output are safe, it returns the model's response; otherwise, it returns an appropriate message.
Conclusion
You have successfully set up your VYSP.AI account, created a gate, and integrated the VYSP.AI security layer into a demo ChatGPT application. For more advanced configurations and features, refer to our detailed documentation.
Feel free to reach out to our support team if you have any questions or need further assistance.
Last updated