mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
(test) test exceptions
This commit is contained in:
parent
54a6e22f21
commit
3297b8ac0c
1 changed files with 5 additions and 2 deletions
|
@ -35,14 +35,14 @@ litellm.num_retries = 0
|
|||
|
||||
# Approach: Run each model through the test -> assert if the correct error (always the same one) is triggered
|
||||
|
||||
models = [
|
||||
exception_models = [
|
||||
"sagemaker/berri-benchmarking-Llama-2-70b-chat-hf-4",
|
||||
"bedrock/anthropic.claude-instant-v1",
|
||||
]
|
||||
|
||||
|
||||
# Test 1: Context Window Errors
|
||||
@pytest.mark.parametrize("model", models)
|
||||
@pytest.mark.parametrize("model", exception_models)
|
||||
def test_context_window(model):
|
||||
print("Testing context window error")
|
||||
sample_text = "Say error 50 times" * 1000000
|
||||
|
@ -63,6 +63,9 @@ def test_context_window(model):
|
|||
pytest.fail(f"An error occcurred - {e}")
|
||||
|
||||
|
||||
models = ["command-nightly"]
|
||||
|
||||
|
||||
@pytest.mark.parametrize("model", models)
|
||||
def test_context_window_with_fallbacks(model):
|
||||
ctx_window_fallback_dict = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue