mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(utils.py): fix response object mapping
This commit is contained in:
parent
548933d0bb
commit
38ff412b9a
2 changed files with 32 additions and 34 deletions
|
@ -1108,7 +1108,7 @@ def client(original_function):
|
|||
if cached_result != None:
|
||||
print_verbose(f"Cache Hit!")
|
||||
call_type = original_function.__name__
|
||||
if call_type == CallTypes.completion.value:
|
||||
if call_type == CallTypes.completion.value and isinstance(cached_result, dict):
|
||||
return convert_to_model_response_object(response_object=cached_result, model_response_object=ModelResponse())
|
||||
else:
|
||||
return cached_result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue