📊 系统状态

服务状态 运行中
运行时间 {{ uptime }}
健康检查次数 {{ health_checks }}
已配置用户数 {{ user_count }}
可用模型
{% for model in models %} {{ model }} {% endfor %}
{% if compute_points %} {% for user_points in compute_points %}

💰 用户 {{ loop.index }} 计算点信息

{% if user_points.error %}
错误 获取失败: {{ user_points.error }}
{% else %}
总计算点 {{ user_points.total|int }}
已使用 {{ user_points.used|int }}
剩余 {{ user_points.left|int }}
使用比例
{{ user_points.percentage }}%
{% if user_points.last_update %}
最后更新时间 {{ user_points.last_update.strftime('%Y-%m-%d %H:%M:%S') }}
{% endif %} {% endif %} {# End if user_points.error #}
{% endfor %} {% else %}

💰 计算点信息

状态 暂无计算点数据或未配置用户
{% endif %} {# End if compute_points #}

🔍 Token 使用统计

总Token使用量 {{ total_tokens.total|int }}
输入Token {{ total_tokens.prompt|int }}
输出Token {{ total_tokens.completion|int }}
* 以上数据仅统计通过本代理使用的token数量,不包含在Abacus官网直接使用的token。数值为粗略估计,可能与实际计费有差异。
{% for model, stats in model_stats.items() %} {% endfor %}
模型 总Token 输入Token 输出Token
{{ model }} {{ stats.total_tokens|int }} {{ stats.prompt_tokens|int }} {{ stats.completion_tokens|int }}

📊 计算点使用日志

{% for key, value in compute_points_log.columns.items() %} {% endfor %} {% for entry in compute_points_log.log %} {% for key, value in compute_points_log.columns.items() %} {% endfor %} {% endfor %}
{{ value }}
{{ entry.get(key, 0) }}

📈 模型使用统计与Token计算方式

{% for model, stats in model_stats.items() %} {% endfor %}
模型 调用次数 输入Token 输出Token 总Token 计算方式
{{ model }} {{ stats.count }} {{ stats.prompt_tokens|int }} {{ stats.completion_tokens|int }} {{ stats.total_tokens|int }} {% if "gpt" in model.lower() or "claude" in model.lower() or model in ["llama-3", "mistral", "gemma"] %} 精确 {% else %} 估算 {% endif %}
* Token计算方式:精确 表示使用tiktoken准确计算,估算 表示使用估算方法(约4字符=1token)。所有统计数据仅供参考,不代表实际计费标准。

📡 API 端点

获取模型列表:

{% if space_url %} GET {{ space_url }}/v1/models {% else %} GET /v1/models {% endif %}

聊天补全:

{% if space_url %} POST {{ space_url }}/v1/chat/completions {% else %} POST /v1/chat/completions {% endif %}

健康检查:

{% if space_url %} GET {{ space_url }}/health {% else %} GET /health {% endif %}