From 6c58fe65ff8c70dec90cd898e93d2322a9ee8501 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Fri, 15 Dec 2023 17:27:48 +0530 Subject: [PATCH] (feat) dynamo db - log call_type --- litellm/integrations/dynamodb.py | 4 ++-- litellm/utils.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/litellm/integrations/dynamodb.py b/litellm/integrations/dynamodb.py index 143b0ec0f..c4d409d57 100644 --- a/litellm/integrations/dynamodb.py +++ b/litellm/integrations/dynamodb.py @@ -62,14 +62,14 @@ class DyanmoDBLogger: metadata = litellm_params.get("metadata", {}) or {} # if litellm_params['metadata'] == None messages = kwargs.get("messages") optional_params = kwargs.get("optional_params", {}) - function_name = kwargs.get("function_name", "litellm.completion") + call_type = kwargs.get("call_type", "litellm.completion") usage = response_obj["usage"] id = response_obj.get("id", str(uuid.uuid4())) # Build the initial payload payload = { "id": id, - "function_name": function_name, + "call_type": call_type, "startTime": start_time, "endTime": end_time, "model": kwargs.get("model", ""), diff --git a/litellm/utils.py b/litellm/utils.py index 1bfd9e28c..b1e225911 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -595,6 +595,7 @@ class Logging: "start_time": self.start_time, "stream": self.stream, "user": user, + "call_type": str(self.call_type), **self.optional_params, **additional_params }