mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
fix - select startTime and endTime on UI
This commit is contained in:
parent
f7150cdba2
commit
fccdb92c6b
1 changed files with 4 additions and 2 deletions
|
@ -7552,7 +7552,7 @@ async def model_metrics(
|
||||||
FROM
|
FROM
|
||||||
"LiteLLM_SpendLogs"
|
"LiteLLM_SpendLogs"
|
||||||
WHERE
|
WHERE
|
||||||
"startTime" >= NOW() - INTERVAL '30 days'
|
"startTime" BETWEEN $2::timestamp AND $3::timestamp
|
||||||
AND "model" = $1 AND "cache_hit" != 'True'
|
AND "model" = $1 AND "cache_hit" != 'True'
|
||||||
GROUP BY
|
GROUP BY
|
||||||
api_base,
|
api_base,
|
||||||
|
@ -7653,6 +7653,8 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
"model" = $2
|
"model" = $2
|
||||||
AND "cache_hit" != 'True'
|
AND "cache_hit" != 'True'
|
||||||
|
AND "startTime" >= $3::timestamp
|
||||||
|
AND "startTime" <= $4::timestamp
|
||||||
GROUP BY
|
GROUP BY
|
||||||
api_base
|
api_base
|
||||||
ORDER BY
|
ORDER BY
|
||||||
|
@ -7660,7 +7662,7 @@ ORDER BY
|
||||||
"""
|
"""
|
||||||
|
|
||||||
db_response = await prisma_client.db.query_raw(
|
db_response = await prisma_client.db.query_raw(
|
||||||
sql_query, alerting_threshold, _selected_model_group
|
sql_query, alerting_threshold, _selected_model_group, startTime, endTime
|
||||||
)
|
)
|
||||||
|
|
||||||
if db_response is not None:
|
if db_response is not None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue