ui - fix latency analytics completion_tokens

This commit is contained in:
Ishaan Jaff 2024-05-29 09:39:53 -07:00
parent dc8480a5e9
commit e252daaf2b

View file

@ -10184,7 +10184,7 @@ async def model_metrics(
model_group,
model,
DATE_TRUNC('day', "startTime")::DATE AS day,
AVG(EXTRACT(epoch FROM ("endTime" - "startTime"))) / SUM(total_tokens) AS avg_latency_per_token
AVG(EXTRACT(epoch FROM ("endTime" - "startTime"))) / SUM(completion_tokens) AS avg_latency_per_token
FROM
"LiteLLM_SpendLogs"
WHERE
@ -10196,7 +10196,7 @@ async def model_metrics(
model,
day
HAVING
SUM(total_tokens) > 0
SUM(completion_tokens) > 0
ORDER BY
avg_latency_per_token DESC;
"""