/** * 用量面板 - 3 统计卡(今日/7 天/30 天)+ 分模型用量表 + 用量说明 */ import { useTranslations } from 'next-intl'; import { modelUsage } from './data'; import { cls, StatCard } from './ui'; export function UsagePanel() { const t = useTranslations(); return (
{/* 统计卡:今日 / 7 天 / 30 天请求量 */}
1,284 {t('c_req_unit')} } tone="purple" sub={`${t('c_tokens')}: 4.2M`} /> 7,940 {t('c_req_unit')} } sub="31.5M tokens" /> 32,118 {t('c_req_unit')} } tone="green" sub="128M tokens" />
{/* 分模型用量表 */}
{t('c_by_model')}
{modelUsage.map((row) => ( ))}
{t('pt_model')} {t('c_requests')} Token in Token out {t('c_cost')}
{row.model} {row.requests} {row.tokensIn} {row.tokensOut} {row.cost}
{/* 用量说明 */}
{t('c_usage_note')}
); }