feat: Sort model token usage by count descending

This commit is contained in:
Paul Gauthier (aider) 2024-12-13 12:31:38 -08:00
parent f953d17889
commit 868e7a278f

View file

@ -31,7 +31,7 @@ print("-" * 60)
print(f"{'Model Name':<40} {'Total Tokens':>15}") print(f"{'Model Name':<40} {'Total Tokens':>15}")
print("-" * 60) print("-" * 60)
for model, tokens in sorted(model_stats.items()): for model, tokens in sorted(model_stats.items(), key=lambda x: x[1], reverse=True):
print(f"{model:<40} {tokens:>15,}") print(f"{model:<40} {tokens:>15,}")
print("-" * 60) print("-" * 60)