Evaluating Model Vulnerabilities Across Different Providers
This tutorial guides you through assessing vulnerabilities in models from various providers using EnkryptAI’s red teaming API. We’ll cover setup and usage for OpenAI, Together, Replicate, Azure ML Studio, and HuggingFace Inference Endpoints.Prerequisites
- Python programming basics
- Accounts with the model providers you want to test
- Python libraries: requests, os, dotenv, json
Setup
- Install required libraries:
Shell
- Set up EnkryptAI API key:
Shell
Running Red Team Tests
Use the following Python script template to run red team tests. Adjust thepayload
for each provider:
Provider-Specific Configurations
Replace thetarget_model_configuration
in the payload with the appropriate details for each provider:
OpenAI
Python
Together
Python
Replicate
Python
Azure ML Studio
Python
HuggingFace Inference Endpoint
Python