DeepTeam is a framework to red team LLMs and AI agents.
new character stream attack
A-Vamshid2179bfb2fab
diff --git a/deepteam/attacks/single_turn/character_stream/__init__.py b/deepteam/attacks/single_turn/character_stream/__init__.pynew file mode 100644index 00000000..447958ba--- /dev/null+++ b/deepteam/attacks/single_turn/character_stream/__init__.py@@ -0,0 +1 @@+from .character_stream import CharacterStream\ No newline at end of filediff --git a/deepteam/attacks/single_turn/character_stream/character_stream.py b/deepteam/attacks/single_turn/character_stream/character_stream.pynew file mode 100644index 00000000..80dbcff0--- /dev/null+++ b/deepteam/attacks/single_turn/character_stream/character_stream.py@@ -0,0 +1,21 @@+from deepteam.attacks.single_turn import BaseSingleTurnAttack+from deepteam.attacks.base_attack import Exploitability+++class CharacterStream(BaseSingleTurnAttack):+ name = "CharacterStream"+ exploitability = Exploitability.MEDIUM+ description = "A single-turn attack that converts regular strings into character streams seperated by spaces ' '."++ def __init__(self, weight: int = 1):+ self.weight = weight++ def enhance(self, attack: str) -> str:+ """Enhance the attack using Base64 encoding."""+ return " ".join(attack)++ async def a_enhance(self, attack):+ return self.enhance(attack)++ def get_name(self) -> str:+ return self.name