diff --git a/litellm/types/guardrails.py b/litellm/types/guardrails.py new file mode 100644 index 00000000000..7dd06a79b17 --- /dev/null +++ b/litellm/types/guardrails.py @@ -0,0 +1,22 @@ +from typing import Dict, List, Optional, TypedDict, Union + +from pydantic import BaseModel, RootModel + +""" +Pydantic object defining how to set guardrails on litellm proxy + +litellm_settings: + guardrails: + - prompt_injection: + callbacks: [lakera_prompt_injection, prompt_injection_api_2] + default_on: true + - detect_secrets: + callbacks: [hide_secrets] + default_on: true +""" + + +class GuardrailItem(BaseModel): + callbacks: List[str] + default_on: bool + guardrail_name: str