1808837298@qq.com 1 год назад
Родитель
Сommit
152950497e
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      relay/helper/price.go

+ 2 - 1
relay/helper/price.go

@@ -26,7 +26,8 @@ func ModelPriceHelper(c *gin.Context, info *relaycommon.RelayInfo, promptTokens
 		if maxTokens != 0 {
 			preConsumedTokens = promptTokens + maxTokens
 		}
-		modelRatio, success := common.GetModelRatio(info.OriginModelName)
+		var success bool
+		modelRatio, success = common.GetModelRatio(info.OriginModelName)
 		if !success {
 			return PriceData{}, fmt.Errorf("model %s ratio not found", info.OriginModelName)
 		}