From cda0a993e23c821c928cb393c13b872d28257239 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Tue, 15 Oct 2024 08:47:23 +0530 Subject: [PATCH] fix importing Cache from litellm (#6219) --- litellm/caching/__init__.py | 1 + tests/local_testing/test_caching.py | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 litellm/caching/__init__.py diff --git a/litellm/caching/__init__.py b/litellm/caching/__init__.py new file mode 100644 index 000000000..65aea7f09 --- /dev/null +++ b/litellm/caching/__init__.py @@ -0,0 +1 @@ +from .caching import Cache diff --git a/tests/local_testing/test_caching.py b/tests/local_testing/test_caching.py index 454068de8..b95b66681 100644 --- a/tests/local_testing/test_caching.py +++ b/tests/local_testing/test_caching.py @@ -2291,3 +2291,10 @@ async def test_basic_rerank_caching(sync_mode, top_n_1, top_n_2, expect_cache_hi assert response.results is not None assert_response_shape(response, custom_llm_provider="cohere") + + +def test_basic_caching_import(): + from litellm.caching import Cache + + assert Cache is not None + print("Cache imported successfully")