فهرست منبع

chore: 添加注释

1808837298@qq.com 1 سال پیش
والد
کامیت
d860289601
2فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 1 0
      web/src/components/ModelPricing.js
  2. 2 1
      web/src/helpers/render.js

+ 1 - 0
web/src/components/ModelPricing.js

@@ -146,6 +146,7 @@ const ModelPricing = () => {
       render: (text, record, index) => {
         let content = text;
         if (record.quota_type === 0) {
+          // 这里的 *2 是因为 1倍率=0.002刀,请勿删除
           let inputRatioPrice = record.model_ratio * 2 * record.group_ratio;
           let completionRatioPrice =
             record.model_ratio *

+ 2 - 1
web/src/helpers/render.js

@@ -149,8 +149,9 @@ export function renderModelPrice(
     if (completionRatio === undefined) {
       completionRatio = 0;
     }
+    // 这里的 *2 是因为 1倍率=0.002刀,请勿删除
     let inputRatioPrice = modelRatio * 2.0 * groupRatio;
-    let completionRatioPrice = modelRatio * completionRatio * groupRatio;
+    let completionRatioPrice = modelRatio * 2.0 * completionRatio * groupRatio;
     let price =
       (inputTokens / 1000000) * inputRatioPrice +
       (completionTokens / 1000000) * completionRatioPrice;