From 584eefec3ea30d8e969428caa300411b89691593 Mon Sep 17 00:00:00 2001 From: CalciumIon <1808837298@qq.com> Date: Mon, 1 Jul 2024 00:56:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E5=96=84=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=89=A3=E8=B4=B9=E8=AE=A1=E7=AE=97=E8=BF=87=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/helpers/render.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/web/src/helpers/render.js b/web/src/helpers/render.js index 971b1d8d1..3ac2f4f9f 100644 --- a/web/src/helpers/render.js +++ b/web/src/helpers/render.js @@ -144,28 +144,29 @@ export function renderModelPrice( ) { // 1 ratio = $0.002 / 1K tokens if (modelPrice !== -1) { - return '模型价格:$' + modelPrice * groupRatio; + return '模型价格:$' + modelPrice + ' * 分组倍率:' + groupRatio + ' = $' + modelPrice * groupRatio; } else { if (completionRatio === undefined) { completionRatio = 0; } // 这里的 *2 是因为 1倍率=0.002刀,请勿删除 - let inputRatioPrice = modelRatio * 2.0 * groupRatio; - let completionRatioPrice = modelRatio * 2.0 * completionRatio * groupRatio; + let inputRatioPrice = modelRatio * 2.0; + let completionRatioPrice = modelRatio * 2.0 * completionRatio; let price = (inputTokens / 1000000) * inputRatioPrice + (completionTokens / 1000000) * completionRatioPrice; return ( <>
-

提示 ${inputRatioPrice} / 1M tokens

-

补全 ${completionRatioPrice} / 1M tokens

+

提示:${inputRatioPrice} * {groupRatio} = ${inputRatioPrice * groupRatio} / 1M tokens

+

补全:${completionRatioPrice} * {groupRatio} = ${completionRatioPrice * groupRatio} / 1M tokens

提示 {inputTokens} tokens / 1M tokens * ${inputRatioPrice} + 补全{' '} - {completionTokens} tokens / 1M tokens * ${completionRatioPrice} = $ - {price.toFixed(6)} + {completionTokens} tokens / 1M tokens * ${completionRatioPrice} * 分组 {groupRatio} = + ${price.toFixed(6)}

+

仅供参考,以实际扣费为准

);