mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
feat(ui/): add new guardrails to guardrail_garden
This commit is contained in:
parent
adda8874e3
commit
7cac456836
3 changed files with 31 additions and 0 deletions
|
|
@ -148,6 +148,18 @@ export const GUARDRAIL_PRESETS: Record<string, GuardrailPreset> = {
|
|||
mode: "pre_call",
|
||||
defaultOn: false,
|
||||
},
|
||||
block_code_execution: {
|
||||
provider: "BlockCodeExecution",
|
||||
guardrailNameSuggestion: "Block Code Execution",
|
||||
mode: "pre_call",
|
||||
defaultOn: false,
|
||||
},
|
||||
cf_competitor_intent: {
|
||||
provider: "LitellmContentFilter",
|
||||
guardrailNameSuggestion: "Competitor Name Blocking",
|
||||
mode: "pre_call",
|
||||
defaultOn: false,
|
||||
},
|
||||
|
||||
// ── Partner Guardrails ──
|
||||
presidio: {
|
||||
|
|
|
|||
|
|
@ -213,6 +213,24 @@ export const LITELLM_CONTENT_FILTER_CARDS: GuardrailCardInfo[] = [
|
|||
logo: `${ASSET_PREFIX}litellm_logo.jpg`,
|
||||
tags: ["Keywords", "Blocklist"],
|
||||
},
|
||||
{
|
||||
id: "block_code_execution",
|
||||
name: "Block Code Execution",
|
||||
description: "Detects markdown fenced code blocks in requests and responses. Block or mask executable code (e.g. Python, JavaScript, Bash) by language with configurable confidence.",
|
||||
category: "litellm",
|
||||
subcategory: "Code Safety",
|
||||
logo: `${ASSET_PREFIX}litellm_logo.jpg`,
|
||||
tags: ["Code", "Safety", "Prompt Injection"],
|
||||
},
|
||||
{
|
||||
id: "cf_competitor_intent",
|
||||
name: "Competitor Name Blocking",
|
||||
description: "Block or reframe competitor comparison and ranking intent. Detect when users ask to compare or recommend competitors (airline or generic competitor lists).",
|
||||
category: "litellm",
|
||||
subcategory: "Content Category",
|
||||
logo: `${ASSET_PREFIX}litellm_logo.jpg`,
|
||||
tags: ["Content Category", "Competitor", "Topic Blocker"],
|
||||
},
|
||||
];
|
||||
|
||||
export const PARTNER_GUARDRAIL_CARDS: GuardrailCardInfo[] = [
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ export const guardrail_provider_map: Record<string, string> = {
|
|||
Lakera: "lakera_v2",
|
||||
LitellmContentFilter: "litellm_content_filter",
|
||||
ToolPermission: "tool_permission",
|
||||
BlockCodeExecution: "block_code_execution",
|
||||
};
|
||||
|
||||
// Function to populate provider map from API response - updates the original map
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue