mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
test(test_streaming.py): handle gemini 500 error
This commit is contained in:
parent
6ba1a5f6b2
commit
c9c6547ef9
1 changed files with 4 additions and 0 deletions
|
|
@ -425,6 +425,8 @@ def test_completion_gemini_stream():
|
|||
if complete_response.strip() == "":
|
||||
raise Exception("Empty response received")
|
||||
print(f"completion_response: {complete_response}")
|
||||
except litellm.APIError as e:
|
||||
pass
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
|
||||
|
|
@ -461,6 +463,8 @@ async def test_acompletion_gemini_stream():
|
|||
print(f"completion_response: {complete_response}")
|
||||
if complete_response.strip() == "":
|
||||
raise Exception("Empty response received")
|
||||
except litellm.APIError as e:
|
||||
pass
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue