This commit is contained in:
1808837298@qq.com
2025-02-28 20:28:44 +08:00
parent d6fd50e382
commit 152950497e

View File

@@ -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)
}