From 868e7a278f28282ba3de5cbd83642c93ea21a792 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Fri, 13 Dec 2024 12:31:38 -0800 Subject: [PATCH] feat: Sort model token usage by count descending --- scripts/my_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/my_models.py b/scripts/my_models.py index 18fa48b25..ae86a6cc3 100755 --- a/scripts/my_models.py +++ b/scripts/my_models.py @@ -31,7 +31,7 @@ print("-" * 60) print(f"{'Model Name':<40} {'Total Tokens':>15}") 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("-" * 60)