forked from phoenix/litellm-mirror
litellm map Azure GPT ContentPolicyViolationError
This commit is contained in:
parent
59dac1bc7a
commit
c6beaf53af
1 changed files with 3 additions and 0 deletions
|
@ -9077,6 +9077,9 @@ def exception_type(
|
||||||
elif (
|
elif (
|
||||||
"invalid_request_error" in error_str
|
"invalid_request_error" in error_str
|
||||||
and "content_policy_violation" 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
|
exception_mapping_worked = True
|
||||||
raise ContentPolicyViolationError(
|
raise ContentPolicyViolationError(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue