mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix show correct team based usage
This commit is contained in:
parent
07821e213a
commit
60e449f03c
1 changed files with 4 additions and 0 deletions
|
@ -5090,6 +5090,8 @@ async def global_spend_per_tea():
|
|||
if row_date is None:
|
||||
continue
|
||||
team_alias = row["team_alias"]
|
||||
if team_alias is None:
|
||||
team_alias = "Unassigned"
|
||||
team_aliases.add(team_alias)
|
||||
if row_date in spend_by_date:
|
||||
# get the team_id for this entry
|
||||
|
@ -5115,6 +5117,8 @@ async def global_spend_per_tea():
|
|||
# only add first 10 elements to total_spend_per_team_ui
|
||||
if len(total_spend_per_team_ui) >= 10:
|
||||
break
|
||||
if team_id is None:
|
||||
team_id = "Unassigned"
|
||||
total_spend_per_team_ui.append(
|
||||
{"team_id": team_id, "total_spend": total_spend_per_team[team_id]}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue