DeepTeam is a framework to red team LLMs and AI agents.
lint
A-Vamshib930c84feb23
diff --git a/deepteam/metrics/__init__.py b/deepteam/metrics/__init__.pyindex 4384829e..7fa6ea33 100644--- a/deepteam/metrics/__init__.py+++ b/deepteam/metrics/__init__.py@@ -13,6 +13,7 @@ from .sql_injection.sql_injection import SQLInjectionMetricfrom .bias.bias import BiasMetricfrom .ethics.ethics import EthicsMetricfrom .fairness.fairness import FairnessMetric+from .child_protection.child_protection import ChildProtectionMetricfrom .bfla.bfla import BFLAMetricfrom .bola.bola import BOLAMetricfrom .competitors.competitors import CompetitorsMetricdiff --git a/deepteam/metrics/child_protection/template.py b/deepteam/metrics/child_protection/template.pyindex 57625c46..46e40e79 100644--- a/deepteam/metrics/child_protection/template.py+++ b/deepteam/metrics/child_protection/template.py@@ -73,7 +73,6 @@ class ChildProtectionTemplate:JSON:"""-@staticmethoddef extract_purpose(prompt_templates: str) -> str:return f"""diff --git a/deepteam/vulnerabilities/__init__.py b/deepteam/vulnerabilities/__init__.pyindex 557ff25f..56a94d5e 100644--- a/deepteam/vulnerabilities/__init__.py+++ b/deepteam/vulnerabilities/__init__.py@@ -7,6 +7,7 @@ from .prompt_leakage.prompt_leakage import PromptLeakagefrom .pii_leakage.pii_leakage import PIILeakagefrom .bfla.bfla import BFLAfrom .bola.bola import BOLA+from .child_protection.child_protection import ChildProtectionfrom .ethics.ethics import Ethicsfrom .fairness.fairness import Fairnessfrom .rbac.rbac import RBAC@@ -30,6 +31,7 @@ from .agentic.excessive_agency.excessive_agency import ExcessiveAgency__all__ = ["BaseVulnerability","Bias",+ "ChildProtection","Ethics","Fairness","Toxicity",diff --git a/deepteam/vulnerabilities/child_protection/__init__.py b/deepteam/vulnerabilities/child_protection/__init__.pyindex f7c6ac86..d667d307 100644--- a/deepteam/vulnerabilities/child_protection/__init__.py+++ b/deepteam/vulnerabilities/child_protection/__init__.py@@ -1,2 +1,2 @@from .template import ChildProtectionTemplate-from .types import ChildProtectionType\ No newline at end of file+from .types import ChildProtectionTypediff --git a/deepteam/vulnerabilities/child_protection/child_protection.py b/deepteam/vulnerabilities/child_protection/child_protection.pyindex 036153b4..1f0aad48 100644--- a/deepteam/vulnerabilities/child_protection/child_protection.py+++ b/deepteam/vulnerabilities/child_protection/child_protection.py@@ -16,7 +16,9 @@ from deepteam.attacks.attack_simulator.schema import SyntheticDataListfrom deepteam.risks import getRiskCategoryfrom .template import ChildProtectionTemplate-ChildProtectionLiteralType = Literal["age_verification", "data_privacy", "exposure_interaction"]+ChildProtectionLiteralType = Literal[+ "age_verification", "data_privacy", "exposure_interaction"+]class ChildProtection(BaseVulnerability):diff --git a/deepteam/vulnerabilities/child_protection/template.py b/deepteam/vulnerabilities/child_protection/template.pyindex aebda64c..cf588957 100644--- a/deepteam/vulnerabilities/child_protection/template.py+++ b/deepteam/vulnerabilities/child_protection/template.py@@ -24,8 +24,10 @@ class ChildProtectionTemplate:max_goldens, purpose)elif vulnerability_type == ChildProtectionType.EXPOSURE_INTERACTION:- return ChildProtectionTemplate.generate_exposure_interaction_attacks(- max_goldens, purpose+ return (+ ChildProtectionTemplate.generate_exposure_interaction_attacks(+ max_goldens, purpose+ ))@staticmethod