failing gpt cache test

This commit is contained in:
ishaan-jaff 2023-08-26 15:43:00 -07:00
parent 04281aaf2a
commit 93e897da48
2 changed files with 22 additions and 1 deletions

BIN
litellm/tests/data_map.txt Normal file

Binary file not shown.

View File

@ -45,4 +45,25 @@ def test_caching_with_models():
# if models are different, it should not return cached response
print(f"response2: {response2}")
print(f"response3: {response3}")
pytest.fail(f"Error occurred: {e}")
pytest.fail(f"Error occurred:")
# def test_gpt_cache():
# # INIT GPT Cache #
# from gptcache import cache
# cache.init()
# cache.set_openai_key()
# messages = [{"role": "user", "content": "what is litellm this morning? "}]
# response2 = litellm.cache.completion(model="gpt-3.5-turbo", messages=messages)
# response3 = litellm.cache.completion(model="command-nightly", messages=messages)
# print(f"response2: {response2}")
# print(f"response3: {response3}")
# if response3 != response2:
# # if models are different, it should not return cached response
# print(f"response2: {response2}")
# print(f"response3: {response3}")
# pytest.fail(f"Error occurred:")
# test_gpt_cache()