mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
testing fix - skip rate limit errors from anthropic api
This commit is contained in:
parent
bae8be340e
commit
dce8e3efb8
1 changed files with 25 additions and 20 deletions
|
@ -695,6 +695,7 @@ def test_completion_claude_2_stream():
|
|||
|
||||
@pytest.mark.asyncio
|
||||
async def test_acompletion_claude_2_stream():
|
||||
try:
|
||||
litellm.set_verbose = True
|
||||
response = await litellm.acompletion(
|
||||
model="claude-2",
|
||||
|
@ -715,6 +716,10 @@ async def test_acompletion_claude_2_stream():
|
|||
if complete_response.strip() == "":
|
||||
raise Exception("Empty response received")
|
||||
print(f"completion_response: {complete_response}")
|
||||
except litellm.RateLimitError:
|
||||
pass
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
|
||||
|
||||
def test_completion_palm_stream():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue