diff --git a/entrypoint.sh b/entrypoint.sh old mode 100644 new mode 100755 diff --git a/router.py b/router.py index 94831f9..9a1f0c8 100644 --- a/router.py +++ b/router.py @@ -1193,9 +1193,10 @@ async def stats_proxy(request: Request, model: Optional[str] = None): status_code=404, detail="No token data found for this model" ) - # Get time series data + # Get time series data for the last 30 days (43200 minutes = 30 days) + # Assuming entries are grouped by minute, 30 days = 43200 entries max time_series = [] - async for entry in db.get_latest_time_series(limit=10): + async for entry in db.get_latest_time_series(limit=50000): if entry['model'] == model: time_series.append({ 'timestamp': entry['timestamp'], diff --git a/static/index.html b/static/index.html index 0ecbf7d..42a7cd7 100644 --- a/static/index.html +++ b/static/index.html @@ -3,6 +3,7 @@