From 3c3c8d9de619911fee59b3adc600921c6d307210 Mon Sep 17 00:00:00 2001 From: Immortalise Date: Sun, 20 Aug 2023 11:58:18 -0400 Subject: [PATCH] fix bugs for LabelConstraint --- prompt_attack/label_constraint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prompt_attack/label_constraint.py b/prompt_attack/label_constraint.py index 6af471b..31ef14b 100644 --- a/prompt_attack/label_constraint.py +++ b/prompt_attack/label_constraint.py @@ -9,7 +9,7 @@ class LabelConstraint(PreTransformationConstraint): """ def __init__(self, labels=[]): - self.labels = labels + self.labels = [label.lower() for label in labels] def _get_modifiable_indices(self, current_text): modifiable_indices = set()