mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
feat(proxy_server.py): show admin global spend as time series data
This commit is contained in:
parent
e39ce9b119
commit
43da22ae13
8 changed files with 422 additions and 98 deletions
|
@ -240,7 +240,10 @@ class ProxyLogging:
|
|||
else:
|
||||
user_info = str(user_info)
|
||||
# percent of max_budget left to spend
|
||||
percent_left = (user_max_budget - user_current_spend) / user_max_budget
|
||||
if user_max_budget > 0:
|
||||
percent_left = (user_max_budget - user_current_spend) / user_max_budget
|
||||
else:
|
||||
percent_left = 0
|
||||
verbose_proxy_logger.debug(
|
||||
f"Budget Alerts: Percent left: {percent_left} for {user_info}"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue