From 1d9dad4af4a16535bb0b0aa242e79c9e6232b2d6 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Thu, 11 Jan 2024 15:57:54 +0530 Subject: [PATCH] (feat) s3 logging - log cache hits --- litellm/integrations/s3.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/litellm/integrations/s3.py b/litellm/integrations/s3.py index db40ae83296..0187d13d6a6 100644 --- a/litellm/integrations/s3.py +++ b/litellm/integrations/s3.py @@ -93,6 +93,7 @@ class S3Logger: messages = kwargs.get("messages") optional_params = kwargs.get("optional_params", {}) call_type = kwargs.get("call_type", "litellm.completion") + cache_hit = kwargs.get("cache_hit", False) usage = response_obj["usage"] id = response_obj.get("id", str(uuid.uuid4())) @@ -100,6 +101,7 @@ class S3Logger: payload = { "id": id, "call_type": call_type, + "cache_hit": cache_hit, "startTime": start_time, "endTime": end_time, "model": kwargs.get("model", ""),