From 542b333c95e92055fa90389b9cea62cefaa5ed6c Mon Sep 17 00:00:00 2001 From: OrangeWolf Date: Thu, 5 Sep 2024 23:21:41 +0800 Subject: [PATCH] Update utils.py (#5530) fix KeyError (cause by typo?) --- litellm/types/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/types/utils.py b/litellm/types/utils.py index 696fb5b837b..e9fe7d963b7 100644 --- a/litellm/types/utils.py +++ b/litellm/types/utils.py @@ -504,7 +504,7 @@ class Usage(CompletionUsage): if "prompt_cache_hit_tokens" in params and isinstance( params["prompt_cache_hit_tokens"], int ): - self._cache_read_input_tokens = params["prompt_cache_hit_tokens=0"] + self._cache_read_input_tokens = params["prompt_cache_hit_tokens"] for k, v in params.items(): setattr(self, k, v)