From 4e795dad81b563861c36057c3badf2a9c6c53a40 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Fri, 21 Jun 2024 16:11:42 -0700 Subject: [PATCH] fix ContentPolicyViolationError mapping --- litellm/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/litellm/utils.py b/litellm/utils.py index c0529133d7b..7a64200760e 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -7175,6 +7175,7 @@ def exception_type( in error_str ) or "Your task failed as a result of our safety system" in error_str + or "The model produced invalid content" in error_str ): exception_mapping_worked = True raise ContentPolicyViolationError(