diff --git a/litellm/__pycache__/__init__.cpython-311.pyc b/litellm/__pycache__/__init__.cpython-311.pyc index 8878d126f8..2ec71aeb75 100644 Binary files a/litellm/__pycache__/__init__.cpython-311.pyc and b/litellm/__pycache__/__init__.cpython-311.pyc differ diff --git a/litellm/__pycache__/timeout.cpython-311.pyc b/litellm/__pycache__/timeout.cpython-311.pyc index aa097515cc..1f3bbe0d80 100644 Binary files a/litellm/__pycache__/timeout.cpython-311.pyc and b/litellm/__pycache__/timeout.cpython-311.pyc differ diff --git a/litellm/__pycache__/utils.cpython-311.pyc b/litellm/__pycache__/utils.cpython-311.pyc index e778fcdd33..81990b8376 100644 Binary files a/litellm/__pycache__/utils.cpython-311.pyc and b/litellm/__pycache__/utils.cpython-311.pyc differ diff --git a/litellm/tests/test_batch_completions.py b/litellm/tests/test_batch_completions.py index f11db7e2b1..e53c015f3b 100644 --- a/litellm/tests/test_batch_completions.py +++ b/litellm/tests/test_batch_completions.py @@ -3,19 +3,26 @@ import sys, os import traceback - +import pytest sys.path.insert( 0, os.path.abspath("../..") ) # Adds the parent directory to the system path +from openai.error import Timeout import litellm from litellm import batch_completion litellm.set_verbose=True -messages = [[{"role": "user", "content": "Hey, how's it going"}] for _ in range(5)] -print(messages[0:5]) -print(len(messages)) -# model = "vllm/facebook/opt-125m" -model = "gpt-3.5-turbo" -result = batch_completion(model=model, messages=messages) -print(result) -print(len(result)) +def test_batch_completions(): + messages = [[{"role": "user", "content": "Hey, how's it going"}] for _ in range(5)] + print(messages[0:5]) + print(len(messages)) + # model = "vllm/facebook/opt-125m" + model = "gpt-3.5-turbo" + try: + result = batch_completion(model=model, messages=messages) + print(result) + print(len(result)) + except Timeout as e: + pass + except Exception as e: + pytest.fail(f"An error occurred: {e}") \ No newline at end of file