mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
build(schema.prisma): add completion_start_time to spend logs
enables time to first token tracking for models
This commit is contained in:
parent
9609df16d3
commit
9f518030b9
3 changed files with 4 additions and 0 deletions
|
@ -1862,6 +1862,7 @@ def get_logging_payload(
|
|||
metadata = (
|
||||
litellm_params.get("metadata", {}) or {}
|
||||
) # if litellm_params['metadata'] == None
|
||||
completion_start_time = kwargs.get("completion_start_time", end_time)
|
||||
call_type = kwargs.get("call_type")
|
||||
cache_hit = kwargs.get("cache_hit", False)
|
||||
usage = response_obj["usage"]
|
||||
|
@ -1910,6 +1911,7 @@ def get_logging_payload(
|
|||
"cache_hit": cache_hit,
|
||||
"startTime": start_time,
|
||||
"endTime": end_time,
|
||||
"completionStartTime": completion_start_time,
|
||||
"model": kwargs.get("model", ""),
|
||||
"user": kwargs.get("litellm_params", {})
|
||||
.get("metadata", {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue