forked from phoenix/litellm-mirror
ui - fix div by 0 error on /model/metrics
This commit is contained in:
parent
31e8b34123
commit
32b664c009
1 changed files with 1 additions and 1 deletions
|
@ -11752,7 +11752,7 @@ async def model_metrics(
|
||||||
model_group,
|
model_group,
|
||||||
model,
|
model,
|
||||||
DATE_TRUNC('day', "startTime")::DATE AS day,
|
DATE_TRUNC('day', "startTime")::DATE AS day,
|
||||||
AVG(EXTRACT(epoch FROM ("endTime" - "startTime")) / "completion_tokens") AS avg_latency_per_token
|
AVG(EXTRACT(epoch FROM ("endTime" - "startTime")) / NULLIF("completion_tokens", 0)) AS avg_latency_per_token
|
||||||
FROM
|
FROM
|
||||||
"LiteLLM_SpendLogs"
|
"LiteLLM_SpendLogs"
|
||||||
WHERE
|
WHERE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue