Merge pull request #1989 from BerriAI/litellm_redis_url_fix

fix(redis.py): fix instantiating redis client from url
This commit is contained in:
Krish Dholakia 2024-02-15 21:23:17 -08:00 committed by GitHub
commit 1e238614c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 44 additions and 17 deletions

View file

@ -7029,6 +7029,14 @@ def exception_type(
model=model,
response=original_exception.response,
)
elif original_exception.status_code == 503:
exception_mapping_worked = True
raise ServiceUnavailableError(
message=f"HuggingfaceException - {original_exception.message}",
llm_provider="huggingface",
model=model,
response=original_exception.response,
)
else:
exception_mapping_worked = True
raise APIError(