fix 1 - latency fix (#7655)

This commit is contained in:
Ishaan Jaff 2025-01-09 15:57:05 -08:00 committed by GitHub
parent b77832a793
commit 6f6bf45684

View file

@ -670,6 +670,8 @@ class LLMCachingHandler:
Raises: Raises:
None None
""" """
if litellm.cache is None:
return
new_kwargs = kwargs.copy() new_kwargs = kwargs.copy()
new_kwargs.update( new_kwargs.update(
@ -678,8 +680,6 @@ class LLMCachingHandler:
args, args,
) )
) )
if litellm.cache is None:
return
# [OPTIONAL] ADD TO CACHE # [OPTIONAL] ADD TO CACHE
if self._should_store_result_in_cache( if self._should_store_result_in_cache(
original_function=original_function, kwargs=new_kwargs original_function=original_function, kwargs=new_kwargs