From 7712aa652aeb59153dee07e4765ad9b77f27e2ac Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 4 Sep 2024 15:22:37 -0700 Subject: [PATCH] fix init presidio guardrail --- litellm/litellm_core_utils/litellm_logging.py | 11 ++++++----- litellm/proxy/proxy_config.yaml | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.py index eb77a0a198..4e40af11ca 100644 --- a/litellm/litellm_core_utils/litellm_logging.py +++ b/litellm/litellm_core_utils/litellm_logging.py @@ -1361,12 +1361,13 @@ class Logging: ) is not True ): - self.model_call_details, result = await callback.async_logging_hook( - kwargs=self.model_call_details, - result=result, - call_type=self.call_type, - ) continue + + self.model_call_details, result = await callback.async_logging_hook( + kwargs=self.model_call_details, + result=result, + call_type=self.call_type, + ) elif isinstance(callback, CustomLogger): self.model_call_details, result = await callback.async_logging_hook( kwargs=self.model_call_details, diff --git a/litellm/proxy/proxy_config.yaml b/litellm/proxy/proxy_config.yaml index 0aaadc13fe..f6942dd29e 100644 --- a/litellm/proxy/proxy_config.yaml +++ b/litellm/proxy/proxy_config.yaml @@ -13,6 +13,7 @@ guardrails: litellm_params: guardrail: presidio # supported values: "aporia", "lakera", "presidio" mode: "pre_call" # pre_call, during_call, post_call + output_parse_pii: True general_settings: master_key: sk-1234