chore: Update terminology from "cache ratio" to "cache multiplier" in UI and add placeholder for default create cache ratio
This commit is contained in:
@@ -21,6 +21,8 @@ var defaultCacheRatio = map[string]float64{
|
|||||||
"deepseek-coder": 0.5,
|
"deepseek-coder": 0.5,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var defaultCreateCacheRatio = map[string]float64{}
|
||||||
|
|
||||||
var cacheRatioMap map[string]float64
|
var cacheRatioMap map[string]float64
|
||||||
var cacheRatioMapMutex sync.RWMutex
|
var cacheRatioMapMutex sync.RWMutex
|
||||||
|
|
||||||
|
|||||||
@@ -638,6 +638,12 @@ const LogsTable = () => {
|
|||||||
value: other.text_output,
|
value: other.text_output,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (other?.cache_tokens > 0) {
|
||||||
|
expandDataLocal.push({
|
||||||
|
key: t('缓存 Tokens'),
|
||||||
|
value: other.cache_tokens,
|
||||||
|
});
|
||||||
|
}
|
||||||
expandDataLocal.push({
|
expandDataLocal.push({
|
||||||
key: t('日志详情'),
|
key: t('日志详情'),
|
||||||
value: logs[i].content,
|
value: logs[i].content,
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ export function renderModelPrice(
|
|||||||
total: completionRatioPrice * groupRatio
|
total: completionRatioPrice * groupRatio
|
||||||
})}</p>
|
})}</p>
|
||||||
{cacheTokens > 0 && (
|
{cacheTokens > 0 && (
|
||||||
<p>{i18next.t('缓存:${{price}} * {{ratio}} = ${{total}} / 1M tokens (缓存比例: {{cacheRatio}})', {
|
<p>{i18next.t('缓存:${{price}} * {{ratio}} = ${{total}} / 1M tokens (缓存倍率: {{cacheRatio}})', {
|
||||||
price: cacheRatioPrice,
|
price: cacheRatioPrice,
|
||||||
ratio: groupRatio,
|
ratio: groupRatio,
|
||||||
total: cacheRatioPrice * groupRatio,
|
total: cacheRatioPrice * groupRatio,
|
||||||
@@ -387,7 +387,7 @@ export function renderModelPriceSimple(
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (cacheTokens !== 0) {
|
if (cacheTokens !== 0) {
|
||||||
return i18next.t('模型: {{ratio}} * 分组: {{groupRatio}} * 缓存比例: {{cacheRatio}}', {
|
return i18next.t('模型: {{ratio}} * 分组: {{groupRatio}} * 缓存倍率: {{cacheRatio}}', {
|
||||||
ratio: modelRatio,
|
ratio: modelRatio,
|
||||||
groupRatio: groupRatio,
|
groupRatio: groupRatio,
|
||||||
cacheRatio: cacheRatio
|
cacheRatio: cacheRatio
|
||||||
@@ -452,7 +452,7 @@ export function renderAudioModelPrice(
|
|||||||
total: completionRatioPrice * groupRatio
|
total: completionRatioPrice * groupRatio
|
||||||
})}</p>
|
})}</p>
|
||||||
{cacheTokens > 0 && (
|
{cacheTokens > 0 && (
|
||||||
<p>{i18next.t('缓存:${{price}} * {{ratio}} = ${{total}} / 1M tokens (缓存比例: {{cacheRatio}})', {
|
<p>{i18next.t('缓存:${{price}} * {{ratio}} = ${{total}} / 1M tokens (缓存倍率: {{cacheRatio}})', {
|
||||||
price: cacheRatioPrice,
|
price: cacheRatioPrice,
|
||||||
ratio: groupRatio,
|
ratio: groupRatio,
|
||||||
total: cacheRatioPrice * groupRatio,
|
total: cacheRatioPrice * groupRatio,
|
||||||
|
|||||||
Reference in New Issue
Block a user