From edbf97adf22f9515953847f33e1c3e8e9ace8538 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Tue, 12 Dec 2023 10:57:51 -0800 Subject: [PATCH] test: testing fixes --- litellm/tests/langfuse.log | 2 +- litellm/tests/test_configs/test_config_no_auth.yaml | 6 ++++++ litellm/tests/test_model_alias_map.py | 2 +- litellm/tests/test_router.py | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/litellm/tests/langfuse.log b/litellm/tests/langfuse.log index bbb757738..0546ed7b3 100644 --- a/litellm/tests/langfuse.log +++ b/litellm/tests/langfuse.log @@ -1,5 +1,5 @@ Task exception was never retrieved -future: exception=RuntimeError('Event loop is closed')> +future: exception=RuntimeError('Event loop is closed')> Traceback (most recent call last): File "/opt/homebrew/lib/python3.11/site-packages/prisma/engine/query.py", line 112, in aclose await self._close_session() diff --git a/litellm/tests/test_configs/test_config_no_auth.yaml b/litellm/tests/test_configs/test_config_no_auth.yaml index 47b83d71c..1dd01d619 100644 --- a/litellm/tests/test_configs/test_config_no_auth.yaml +++ b/litellm/tests/test_configs/test_config_no_auth.yaml @@ -67,3 +67,9 @@ model_list: description: this is a test openai model id: f6f74e14-ac64-4403-9365-319e584dcdc5 model_name: test_openai_models +- litellm_params: + model: gpt-3.5-turbo + model_info: + description: this is a test openai model + id: 9b1ef341-322c-410a-8992-903987fef439 + model_name: test_openai_models diff --git a/litellm/tests/test_model_alias_map.py b/litellm/tests/test_model_alias_map.py index f4647fe7c..b99a626e3 100644 --- a/litellm/tests/test_model_alias_map.py +++ b/litellm/tests/test_model_alias_map.py @@ -17,10 +17,10 @@ model_alias_map = { "good-model": "anyscale/meta-llama/Llama-2-7b-chat-hf" } -litellm.model_alias_map = model_alias_map def test_model_alias_map(): try: + litellm.model_alias_map = model_alias_map response = completion( "good-model", messages=[{"role": "user", "content": "Hey, how's it going?"}], diff --git a/litellm/tests/test_router.py b/litellm/tests/test_router.py index 57711082d..7e859094a 100644 --- a/litellm/tests/test_router.py +++ b/litellm/tests/test_router.py @@ -366,7 +366,7 @@ def test_function_calling(): } ] - router = Router(model_list=model_list, routing_strategy="latency-based-routing") + router = Router(model_list=model_list) response = router.completion(model="gpt-3.5-turbo-0613", messages=messages, functions=functions) router.reset() print(response)