mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
copy
This commit is contained in:
parent
abfb2ca810
commit
edc602c33a
5 changed files with 96 additions and 87 deletions
0
scripts/__init__.py
Normal file
0
scripts/__init__.py
Normal file
|
@ -52,8 +52,6 @@ def format_html_table(model_stats):
|
|||
total_tokens = sum(model_stats.values())
|
||||
|
||||
html = [
|
||||
"<html>",
|
||||
"<head>",
|
||||
"<style>",
|
||||
"table { border-collapse: collapse; width: 100%; }",
|
||||
"th, td { padding: 8px; text-align: left; border-bottom: 1px solid #ddd; }",
|
||||
|
@ -61,9 +59,6 @@ def format_html_table(model_stats):
|
|||
"tr:hover { background-color: #f5f5f5; }",
|
||||
".right { text-align: right; }",
|
||||
"</style>",
|
||||
"</head>",
|
||||
"<body>",
|
||||
"<h2>Model Token Usage Summary</h2>",
|
||||
"<table>",
|
||||
(
|
||||
"<tr><th>Model Name</th><th class='right'>Total Tokens</th><th"
|
||||
|
@ -79,13 +74,7 @@ def format_html_table(model_stats):
|
|||
f"<td class='right'>{percentage:.1f}%</td></tr>"
|
||||
)
|
||||
|
||||
html.append(
|
||||
"<tr><td><strong>TOTAL</strong></td>"
|
||||
f"<td class='right'><strong>{total_tokens:,}</strong></td>"
|
||||
"<td class='right'><strong>100.0%</strong></td></tr>"
|
||||
)
|
||||
|
||||
html.extend(["</table>", "</body>", "</html>"])
|
||||
html.extend(["</table>"])
|
||||
return "\n".join(html)
|
||||
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ cog $ARG \
|
|||
aider/website/HISTORY.md \
|
||||
aider/website/docs/usage/commands.md \
|
||||
aider/website/docs/languages.md \
|
||||
aider/website/docs/faq.md \
|
||||
aider/website/docs/config/dotenv.md \
|
||||
aider/website/docs/config/options.md \
|
||||
aider/website/docs/config/aider_conf.md \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue