fix ContentPolicyViolationError mapping

This commit is contained in:
Ishaan Jaff 2024-06-21 16:11:42 -07:00
parent cc11cedf02
commit 4e795dad81

View file

@ -7175,6 +7175,7 @@ def exception_type(
in error_str in error_str
) )
or "Your task failed as a result of our safety system" 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 exception_mapping_worked = True
raise ContentPolicyViolationError( raise ContentPolicyViolationError(