-
Notifications
You must be signed in to change notification settings - Fork 665
Open
Description
from pyrit.executor.attack import AttackExecutor
AttackExecutor().execute_multi_turn_attacks_async(TAPAttack())The code above will throw an error when run:
Attack strategy TreeOfAttacksWithPruningAttack must use MultiTurnAttackContext or a subclass of it.
# Validate that the attack uses MultiTurnAttackContext
if hasattr(attack, "_context_type") and not issubclass(attack._context_type, MultiTurnAttackContext):
raise TypeError(
f"Attack strategy {attack.__class__.__name__} must use MultiTurnAttackContext or a subclass of it."
)I'd like to know if this design intentionally excludes TAP? Could the type checking be relaxed to allow TAPAttackContext as well?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels