ci/cd fix predibase 500 errors

This commit is contained in:
Ishaan Jaff 2024-06-11 23:15:48 -07:00
parent a9e61ef96d
commit 5ebeb4d067
2 changed files with 11 additions and 0 deletions

View file

@ -8771,6 +8771,13 @@ def exception_type(
response=original_exception.response,
litellm_debug_info=extra_information,
)
if "Request failed during generation" in error_str:
# this is an internal server error from predibase
raise litellm.InternalServerError(
message=f"PredibaseException - {error_str}",
llm_provider="predibase",
model=model,
)
elif hasattr(original_exception, "status_code"):
if original_exception.status_code == 500:
exception_mapping_worked = True