From f2522867ed1a3c8b026fd444681be4907791dab3 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Sat, 13 Jul 2024 11:44:37 -0700 Subject: [PATCH] fix(types/guardrails.py): add 'logging_only' param support --- litellm/types/guardrails.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/litellm/types/guardrails.py b/litellm/types/guardrails.py index 7dd06a79b..a5b5f5562 100644 --- a/litellm/types/guardrails.py +++ b/litellm/types/guardrails.py @@ -19,4 +19,19 @@ litellm_settings: class GuardrailItem(BaseModel): callbacks: List[str] default_on: bool + logging_only: Optional[bool] guardrail_name: str + + def __init__( + self, + callbacks: List[str], + default_on: bool, + guardrail_name: str, + logging_only: Optional[bool] = None, + ): + super().__init__( + callbacks=callbacks, + default_on=default_on, + logging_only=logging_only, + guardrail_name=guardrail_name, + )