nemoguardrails.library.jailbreak_detection.model_based.checks
nemoguardrails.library.jailbreak_detection.model_based.checks
Module Contents
Functions
Data
API
Use embedding-based jailbreak detection model to check for the presence of a jailbreak Args: prompt: User utterance to classify classifier: Instantiated JailbreakClassifier object
Raises:
RuntimeError: If no classifier is available and EMBEDDING_CLASSIFIER_PATH is not set
Initialize the global classifier model according to the configuration provided. Args classifier_path: Path to the classifier model Returns jailbreak_classifier: JailbreakClassifier object combining embedding model and NemoGuard JailbreakDetect RF