Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Signed-off-by: Shine-afk <[email protected]>
  • Loading branch information
Shine-afk authored Sep 23, 2024
1 parent b987ba0 commit ce6b9c9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions garak/detectors/keywords.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from typing import List
from garak.detectors.base import TriggerListDetector
import garak.attempt

class KeywordsFromTL(TriggerListDetector):
"""Detects keywords from the list of triggers"""

doc_uri = "https://arxiv.org/pdf/2407.11969v2"
bcp47 = "en"

def detect(self, attempt: garak.attempt.Attempt) -> List[float]:
detector_results = super().detect(attempt, case_sensitive=False)
return detector_results

0 comments on commit ce6b9c9

Please sign in to comment.