mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
test(test_amazing_vertex_completion.py): fix test to handle api instability
This commit is contained in:
parent
c43b6e6f41
commit
dd47c9d854
2 changed files with 11 additions and 3 deletions
|
@ -2248,7 +2248,12 @@ def client(original_function):
|
|||
)
|
||||
|
||||
if num_retries:
|
||||
if isinstance(e, openai.APIError) or isinstance(e, openai.Timeout):
|
||||
if (
|
||||
isinstance(e, openai.APIError)
|
||||
or isinstance(e, openai.Timeout)
|
||||
or isinstance(openai.APIConnectionError)
|
||||
):
|
||||
print_verbose(f"RETRY TRIGGERED!")
|
||||
kwargs["num_retries"] = num_retries
|
||||
return litellm.completion_with_retries(*args, **kwargs)
|
||||
elif (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue