feat(Add llm-adaptive-attacks):

This commit is contained in:
Alexander Myasoedov
2024-04-25 21:31:09 +03:00
parent f4816fea67
commit db0abe14e6
11 changed files with 611 additions and 8 deletions
+23
View File
@@ -0,0 +1,23 @@
from inline_snapshot import snapshot
from .data import prepare_prompts, ProbeDataset
class TestPreparePrompts:
# Empty dataset_names input returns an empty list
def test_empty_dataset_list(self):
# Call the prepare_prompts function with an empty dataset_names list
prepared_prompts = prepare_prompts([], 100)
# Assert that the prepared_prompts list is empty
assert prepared_prompts == []
assert len(
prepare_prompts(["markush1/LLM-Jailbreak-Classifier"], 100)
) == snapshot(1)
assert len(
prepare_prompts(
["markush1/LLM-Jailbreak-Classifier", "llm-adaptive-attacks"],
100,
)
) == snapshot(2)