Tutorials
RedTeam Models
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, Anyscale, 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:
- Set up EnkryptAI API key:
Create an account at app.enkryptai.com and generate an API key. Then export it as an environment variable:
Running Red Team Tests
Use the following Python script template to run red team tests. Adjust the payload
for each provider:
Provider-Specific Configurations
Replace the target_model_configuration
in the payload with the appropriate details for each provider:
OpenAI
Anyscale
Together
Replicate
Azure ML Studio
HuggingFace Inference Endpoint
Replace placeholder API keys and endpoints with your actual credentials for each provider.