fix(proxy_server.py): fix latency calc for avg output token

This commit is contained in:
Ishaan Jaff 2024-05-29 09:49:45 -07:00
parent e252daaf2b
commit 02598ae988

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(completion_tokens) AS avg_latency_per_token
AVG(EXTRACT(epoch FROM ("endTime" - "startTime")) / "completion_tokens") AS avg_latency_per_token
FROM
"LiteLLM_SpendLogs"
WHERE