{% from 'macros.html' import comparison_chart, number, disclosure, coverage_notice with context %} {% from 'components/page-heading.html' import page_heading %} {% call page_heading(t.usage, t.usage_subtitle) %}
{% if stats %}{{ stats.start }} / {{ stats.end }} · UTC{% endif %}
{% endcall %} {% if errors.get('usage') %}{{ read_error(errors.usage, t.usage) }}{% else %}

{{ t.comparison }}{% if stats.percent is not none %}
{{ t.increased if stats.token_reduction < 0 else t.reduced }}{% endif %}

{% if not stats.estimator_available %}

{{ t.no_estimates }}

{{ t.no_estimates_body }}

{% elif stats.empty %}

{{ t.usage_empty }}

{% elif stats.percent is not none %}
{{ stats.percent }}%{{ '↑' if stats.token_reduction < 0 else '↓' }}

{{ t.more_tokens if stats.token_reduction < 0 else t.fewer_tokens }} {{ number(stats.token_reduction|abs) }} tokens

{% else %}

{{ t.no_comparison }}

{% endif %} {% if stats.estimator_available %}
{{ t.baseline }}
{{ number(stats.baseline_tokens) }}
{{ t.recalled }}
{{ number(stats.recalled_tokens) }}
{% endif %} {% if stats.comparable_preparations > 0 %}

{{ coverage_notice() }}

{% endif %}

{{ t.daily_title }}

tokens
{{ comparison_chart() }}
{% if stats.estimator_available %}
{{ t.estimate_notice }}
{% endif %} {% if stats.token_reduction < 0 %}

{{ t.negative_notice }}

{% endif %}

{{ t.model_usage }}

{{ t.model_note }}

{% for row in stats.model_usage %}{% else %}{% endfor %}{% for operation in ['generation', 'embedding'] %}{% endfor %}
{{ t.purpose }}{{ t.input }}{{ t.output }}
{{ t.get(row.purpose, row.purpose) }}{{ t[row.operation] }}{{ number(row.input_tokens) }}{{ number(row.output_tokens) }}
{{ t.usage_empty }}
{{ t[operation ~ '_total'] }}{{ number(stats[operation].input_tokens) }}{{ number(stats[operation].output_tokens) }}
{% if stats.unknown_usage %}{% endif %}
{% if stats.estimator_available %}
{% call disclosure('daily-summary', t.daily_details) %}
{% for label in ['date', 'baseline', 'recalled', 'difference'] %}{% endfor %}{% for row in stats.daily %}{% endfor %}
{{ t.daily_title }} · UTC · tokens
{{ t[label] }}
{{ row.date }}{{ number(row.baseline_tokens) }}{{ number(row.recalled_tokens) }}{{ number(row.baseline_tokens - row.recalled_tokens) }}
{% endcall %}
{% endif %} {% endif %}