Skip to content

Commit

Permalink
Update PromptInjectionDetector.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxMLang authored Jul 20, 2024
1 parent f8a633c commit ae109cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/PromptInjectionDetector.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ detector.report_injection_status(prompt="Example prompt")
Initializes a new instance of the `PromptInjectionDetector`.

- `model_name_or_url`: A string that specifies the model to use. It can be either a key from the predefined models or a valid URL to a custom model.
```
"deberta": "protectai/deberta-v3-base-prompt-injection"
"distilbert": "fmops/distilbert-prompt-injection"
"distilbert-onxx": "prompt-security/fmops-distilbert-prompt-injection-onnx"
```

- `default_threshold`: A float representing the probability threshold above which a prompt is considered as containing an injection.

### `detect_injection(self, prompt, threshold=None)`
Expand Down

0 comments on commit ae109cc

Please sign in to comment.