Merge pull request #3210 from BerriAI/litellm_ui_round_up_team_spend_2_decimals

[UI] round up team spend to 2 decimals + diversify legend for team spend
This commit is contained in:
Ishaan Jaff 2024-04-22 13:45:52 -07:00 committed by GitHub
commit 1a945092de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View file

@ -5552,10 +5552,12 @@ async def global_spend_per_tea():
# get the team_id for this entry
# get the spend for this entry
spend = row["total_spend"]
spend = round(spend, 2)
current_date_entries = spend_by_date[row_date]
current_date_entries[team_alias] = spend
else:
spend = row["total_spend"]
spend = round(spend, 2)
spend_by_date[row_date] = {team_alias: spend}
if team_alias in total_spend_per_team:

View file

@ -392,6 +392,7 @@ const UsagePage: React.FC<UsagePageProps> = ({
index="date"
categories={uniqueTeamIds}
yAxisWidth={80}
colors={["blue", "green", "yellow", "red", "purple"]}
stack={true}
/>