fix(utils.py): fix watsonx exception mapping

This commit is contained in:
Krrish Dholakia 2024-05-13 18:13:13 -07:00
parent 3694b5e7c0
commit 29449aa5c1
2 changed files with 3 additions and 1 deletions

View file

@ -8514,7 +8514,7 @@ def exception_type(
request=original_exception.request,
)
elif custom_llm_provider == "watsonx":
if "token_quota_reached" in error_response:
if "token_quota_reached" in error_str:
exception_mapping_worked = True
raise RateLimitError(
message=f"WatsonxException: Rate Limit Errror - {error_str}",