From c6beaf53afad4b9457b984b09a2ef707c7601491 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 4 May 2024 11:14:47 -0700 Subject: [PATCH] litellm map Azure GPT ContentPolicyViolationError --- litellm/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/litellm/utils.py b/litellm/utils.py index ac8ec35d4..75031a7c3 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -9077,6 +9077,9 @@ def exception_type( elif ( "invalid_request_error" in error_str and "content_policy_violation" in error_str + ) or ( + "The response was filtered due to the prompt triggering Azure OpenAI's content management" + in error_str ): exception_mapping_worked = True raise ContentPolicyViolationError(