From 4d718f97ef2940ded2305bf063ba5fa70edd2a34 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Sun, 6 Jul 2025 21:42:58 -0700 Subject: [PATCH] docs(azure_content_guardrails.md): add doc on azure content guardrails --- .../guardrails/azure_content_guardrail.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/my-website/docs/proxy/guardrails/azure_content_guardrail.md b/docs/my-website/docs/proxy/guardrails/azure_content_guardrail.md index c21616690a..5477c7fd50 100644 --- a/docs/my-website/docs/proxy/guardrails/azure_content_guardrail.md +++ b/docs/my-website/docs/proxy/guardrails/azure_content_guardrail.md @@ -71,6 +71,35 @@ curl -i http://localhost:4000/v1/chat/completions \ }' ``` +## Supported Params + +### Common Params + +- `api_key` - str - Azure Content Safety API key +- `api_base` - str - Azure Content Safety API base URL +- `default_on` - bool - Whether to run the guardrail by default. Default is `false`. +- `mode` - Union[str, list[str]] - Mode to run the guardrail. Either `pre_call` or `post_call`. Default is `pre_call`. + +### Azure Text Moderation + +- `severity_threshold` - int - Severity threshold for the Azure Content Safety Text Moderation guardrail across all categories +- `severity_threshold_by_category` - Dict[AzureHarmCategories, int] - Severity threshold by category for the Azure Content Safety Text Moderation guardrail. See list of categories - https://learn.microsoft.com/en-us/azure/ai-services/content-safety/concepts/harm-categories?tabs=warning +- `categories` - List[AzureHarmCategories] - Categories to scan for the Azure Content Safety Text Moderation guardrail. See list of categories - https://learn.microsoft.com/en-us/azure/ai-services/content-safety/concepts/harm-categories?tabs=warning +- `blocklistNames` - List[str] - Blocklist names to scan for the Azure Content Safety Text Moderation guardrail. Learn more - https://learn.microsoft.com/en-us/azure/ai-services/content-safety/quickstart-text +- `haltOnBlocklistHit` - bool - Whether to halt the request if a blocklist hit is detected +- `outputType` - Literal["FourSeverityLevels", "EightSeverityLevels"] - Output type for the Azure Content Safety Text Moderation guardrail. Learn more - https://learn.microsoft.com/en-us/azure/ai-services/content-safety/quickstart-text + + +AzureHarmCategories: +- Hate +- SelfHarm +- Sexual +- Violence + +### Azure Prompt Shield Only + +n/a + ## Further Reading