aboutsummaryrefslogtreecommitdiff
path: root/benchmark/agbenchmark/utils/challenge.py
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/agbenchmark/utils/challenge.py')
-rw-r--r--benchmark/agbenchmark/utils/challenge.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/benchmark/agbenchmark/utils/challenge.py b/benchmark/agbenchmark/utils/challenge.py
index 36bf0af22..20353f685 100644
--- a/benchmark/agbenchmark/utils/challenge.py
+++ b/benchmark/agbenchmark/utils/challenge.py
@@ -123,6 +123,9 @@ class Challenge(ABC):
print("\033[1;34mScoring content:\033[0m", content)
if ground.should_contain:
for should_contain_word in ground.should_contain:
+ if not getattr(ground, 'case_sensitive', True):
+ should_contain_word = should_contain_word.lower()
+ content = content.lower()
print_content = (
f"\033[1;34mWord that should exist\033[0m - {should_contain_word}:"
)
@@ -134,6 +137,9 @@ class Challenge(ABC):
if ground.should_not_contain:
for should_not_contain_word in ground.should_not_contain:
+ if not getattr(ground, 'case_sensitive', True):
+ should_not_contain_word = should_not_contain_word.lower()
+ content = content.lower()
print_content = f"\033[1;34mWord that should not exist\033[0m - {should_not_contain_word}:"
if should_not_contain_word in content:
print(print_content, "False")