DeepTeam is a framework to red team LLMs and AI agents.
Final touches
penguinebdec73d83acb
diff --git a/deepteam/red_teamer/red_teamer.py b/deepteam/red_teamer/red_teamer.pyindex 7d90dad4..e610c14e 100644--- a/deepteam/red_teamer/red_teamer.py+++ b/deepteam/red_teamer/red_teamer.py@@ -9,6 +9,7 @@ import inspectfrom rich import boxfrom enum import Enumfrom rich.console import Console+import webbrowserfrom deepeval.models import DeepEvalBaseLLM@@ -706,4 +707,9 @@ class RedTeamer:endpoint=Endpoints.RISK_ASSESSMENT_ENDPOINT,body=body,)- print(data, link, "@@@")++ console.print(+ "[rgb(5,245,141)]✓[/rgb(5,245,141)] Done 🎉! View risk assessment on Confident AI:"+ f"[link={link}]{link}[/link]"+ )+ webbrowser.open(link)diff --git a/kk.py b/kk.pyindex c62a4d97..994bab52 100644--- a/kk.py+++ b/kk.py@@ -4,17 +4,17 @@ from deepteam.attacks.single_turn import Roleplayimport os-# async def your_callback(input: str) -> str:-# return "I'm sorry but I can't answer this: " + input+async def your_callback(input: str) -> str:+ return "I'm sorry but I can't answer this: " + input-# print(os.environ.get("CONFIDENT_API_KEY"))+print(os.environ.get("CONFIDENT_API_KEY"))-# risk_assessment = red_team(-# attacks=[Roleplay()],-# vulnerabilities=[Bias(), BOLA()],-# model_callback=your_callback,-# )+risk_assessment = red_team(+ attacks=[Roleplay()],+ vulnerabilities=[Bias(), BOLA()],+ model_callback=your_callback,+)from deepteam.vulnerabilities.constants import (VULNERABILITY_NAMES,