fix(router.py): fix default caching response value

This commit is contained in:
Krrish Dholakia 2023-12-07 13:44:21 -08:00
parent 418099085c
commit e5638e2c5d
7 changed files with 127 additions and 7 deletions

View file

@ -1509,7 +1509,8 @@ def client(original_function):
# if caching is false, don't run this
if (kwargs.get("caching", None) is None and litellm.cache is not None) or kwargs.get("caching", False) == True: # allow users to control returning cached responses from the completion function
# checking cache
if (litellm.cache != None):
print_verbose(f"INSIDE CHECKING CACHE")
if litellm.cache is not None:
print_verbose(f"Checking Cache")
cached_result = litellm.cache.get_cache(*args, **kwargs)
if cached_result != None: