DeepTeam is a framework to red team LLMs and AI agents.
minor fixes
A-Vamshi3f447769f33b
diff --git a/deepteam/red_teamer/red_teamer.py b/deepteam/red_teamer/red_teamer.pyindex cb86f608..cf5319e7 100644--- a/deepteam/red_teamer/red_teamer.py+++ b/deepteam/red_teamer/red_teamer.py@@ -5,6 +5,7 @@ from rich.console import Consolefrom rich.table import Tableimport inspectfrom rich import box+from enum import Enumfrom deepeval.models import DeepEvalBaseLLM@@ -140,7 +141,9 @@ class RedTeamer:].append(simulated_test_case)simulated_test_case.risk_category = getRiskCategory(simulated_test_case.vulnerability_type- ).value+ )+ if isinstance(simulated_test_case.risk_category, Enum):+ simulated_test_case.risk_category = simulated_test_case.risk_category.valuetotal_attacks = sum(len(attacks)@@ -247,7 +250,9 @@ class RedTeamer:].append(simulated_test_case)simulated_test_case.risk_category = getRiskCategory(simulated_test_case.vulnerability_type- ).value+ )+ if isinstance(simulated_test_case.risk_category, Enum):+ simulated_test_case.risk_category = simulated_test_case.risk_category.valuesemaphore = asyncio.Semaphore(self.max_concurrent)total_attacks = sum(diff --git a/tests/test_core/test_vulnerabilities/test_recursive_hijacking.py b/tests/test_core/test_vulnerabilities/test_recursive_hijacking.pyindex 8fc6d849..fb57693b 100644--- a/tests/test_core/test_vulnerabilities/test_recursive_hijacking.py+++ b/tests/test_core/test_vulnerabilities/test_recursive_hijacking.py@@ -129,7 +129,6 @@ class TestRecursiveHijacking:results = await recursive_hijack.a_assess(model_callback=dummy_model_callback,- attacks_per_vulnerability_type=1,)assert recursive_hijack.is_vulnerable() is not Nonediff --git a/tests/test_core/test_vulnerabilities/test_robustness.py b/tests/test_core/test_vulnerabilities/test_robustness.pyindex 75e1fe82..409db59d 100644--- a/tests/test_core/test_vulnerabilities/test_robustness.py+++ b/tests/test_core/test_vulnerabilities/test_robustness.py@@ -101,7 +101,6 @@ class TestRobustness:results = await robustness.a_assess(model_callback=dummy_model_callback,- attacks_per_vulnerability_type=1,)assert robustness.is_vulnerable() is not None