dragon.ai.inference.config.GuardrailsConfig
- class GuardrailsConfig[source]
Bases:
objectPrompt guardrails configuration.
Configures optional PromptGuard-based filtering before prompts reach the vLLM engine.
- Parameters:
enabled (bool ) – Enable PromptGuard preprocessing. Disabled prompts bypass guardrail scoring and are considered safe.
prompt_guard_model (str ) – Hugging Face model name or local path for the PromptGuard classifier.
prompt_guard_sensitivity (float ) – Jailbreak score threshold in the range
[0.0, 1.0]. Prompts with scores greater than or equal to this value are rejected.
- __init__(enabled: bool = True, prompt_guard_model: str = 'meta-llama/Prompt-Guard-86M', prompt_guard_sensitivity: float = 0.5) None
Methods
__init__([enabled, prompt_guard_model, ...])validate()Validate guardrails configuration.
Attributes