mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-09-01 23:27:14 +00:00
fix(i18n,api): backfill missing token-monitoring keys and fix JWT expiry tz
- i18n: add models.searchProviders, monitoring.tabs.tokens and the monitoring.tokens.* block (incl. bucket.hour/day) to es-ES, ja-JP, ru-RU, th-TH, vi-VN and zh-Hant, which were missing them and failed the Check i18n Keys CI. - api: generate_jwt_token built 'exp' from a naive datetime.now(), which PyJWT validates against UTC — in any timezone ahead of UTC the token was already expired at issue time. Use datetime.now(timezone.utc).
This commit is contained in:
@@ -250,6 +250,7 @@ const zhHant = {
|
||||
selectProvider: '選擇供應商',
|
||||
requester: '供應商類型',
|
||||
selectRequester: '選擇供應商類型',
|
||||
searchProviders: '搜尋供應商...',
|
||||
langbotModelsDescription: '由 LangBot Space 提供的雲端模型',
|
||||
credits: '積分',
|
||||
loginWithSpace: '使用 Space 登入',
|
||||
@@ -1146,6 +1147,7 @@ const zhHant = {
|
||||
llmCalls: 'LLM調用',
|
||||
embeddingCalls: 'Embedding調用',
|
||||
modelCalls: '模型調用',
|
||||
tokens: 'Token 監控',
|
||||
sessions: '會話分析',
|
||||
feedback: '使用者反饋',
|
||||
errors: '錯誤日誌',
|
||||
@@ -1184,6 +1186,30 @@ const zhHant = {
|
||||
avgDuration: '平均持續時間',
|
||||
calls: '呼叫次數',
|
||||
},
|
||||
tokens: {
|
||||
totalTokens: '總 Token 數',
|
||||
inputTokens: '輸入 Token',
|
||||
outputTokens: '輸出 Token',
|
||||
avgPerCall: '平均每次呼叫',
|
||||
throughput: '吞吐量',
|
||||
tokensPerSec: 'Token/秒',
|
||||
errorCalls: '失敗呼叫',
|
||||
acrossCalls: '共 {{count}} 次呼叫',
|
||||
ofTotal: '共 {{count}} 次',
|
||||
usageOverTime: 'Token 用量趨勢',
|
||||
byModel: '按模型統計',
|
||||
model: '模型',
|
||||
calls: '呼叫次數',
|
||||
avgLatency: '平均延遲',
|
||||
noData: '所選時間範圍內暫無 Token 用量資料',
|
||||
loadError: '載入 Token 統計失敗:{{error}}',
|
||||
zeroTokenWarning:
|
||||
'偵測到 {{count}} 次成功呼叫未上報 Token 用量(記為 0)。這通常表示上游未返回 usage 資訊,請檢查模型供應商設定。',
|
||||
bucket: {
|
||||
hour: '按小時',
|
||||
day: '按天',
|
||||
},
|
||||
},
|
||||
embeddingCalls: {
|
||||
title: 'Embedding調用',
|
||||
model: '模型',
|
||||
|
||||
Reference in New Issue
Block a user