mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
(feat) dynamo db - log call_type
This commit is contained in:
parent
cec7fcee2c
commit
6c58fe65ff
2 changed files with 3 additions and 2 deletions
|
@ -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", ""),
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue