From 83aa304c34f3433351a5f3a24ca1630c32b3d26d Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Mon, 28 Aug 2023 14:53:41 -0700 Subject: [PATCH] fix caching --- litellm/{cache.py => gpt_cache.py} | 0 litellm/tests/data_map.txt | Bin 1352 -> 1880 bytes litellm/tests/test_caching.py | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) rename litellm/{cache.py => gpt_cache.py} (100%) diff --git a/litellm/cache.py b/litellm/gpt_cache.py similarity index 100% rename from litellm/cache.py rename to litellm/gpt_cache.py diff --git a/litellm/tests/data_map.txt b/litellm/tests/data_map.txt index a4cc414230c30c7a0f5dbc3bb9b64bc1537c2943..96c53e15ee7a3f8feb8faaddacc20d06f677eaaf 100644 GIT binary patch delta 427 zcmZvYy-EW?6ooNt2n5u^Led@5Bx2l1OmATo!8C%9!eVxJvNJe8%lssy5Ven3?D`&Uas%tDX9N^nB5HslP>s%hsF`2W}y_qe4hb&M+7p4^B?2 zE{j?7;Gwz=)AsVST-EyLB+=fX{ny-vw_N3Lj3VbVs^F-RF-ERqQD|#fUe`u<@l)lhW%r-f1@Qv8A&kf# z3Syk1W(_g?1@U;Pjal@N1c(tbtvU{j%qU2jQfuKf3TmuYM1ZTQHj+556~3{#%C7i~ zXPyWPuf%#I;4os5(7;^(WJ@ZF&mD(PvS4IG?&`| delta 29 lcmcb?cY=$xfn};K>qgcKER*lEi88WI{>m1~Qd*j%2LP0G37Y@_ diff --git a/litellm/tests/test_caching.py b/litellm/tests/test_caching.py index 7a6ca0882..3e89398a9 100644 --- a/litellm/tests/test_caching.py +++ b/litellm/tests/test_caching.py @@ -59,12 +59,12 @@ def test_caching_with_models(): def test_gpt_cache(): # INIT GPT Cache # from gptcache import cache - from litellm.cache import completion + from litellm.gpt_cache import completion cache.init() cache.set_openai_key() - messages = [{"role": "user", "content": "what is litellm YC 22?"}] + messages = [{"role": "user", "content": "what is litellm YC paul graham, partner?"}] response2 = completion(model="gpt-3.5-turbo", messages=messages) response3 = completion(model="command-nightly", messages=messages) print(f"response2: {response2}")