(test) test exceptions

This commit is contained in:
ishaan-jaff 2024-01-15 22:01:33 -08:00
parent 54a6e22f21
commit 3297b8ac0c

View file

@ -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 = {