|
|
@@ -93,6 +93,7 @@ func TextHelper(c *gin.Context) (openaiErr *dto.OpenAIErrorWithStatusCode) {
|
|
|
}
|
|
|
}
|
|
|
relayInfo.UpstreamModelName = textRequest.Model
|
|
|
+ relayInfo.RecodeModelName = textRequest.Model
|
|
|
modelPrice, getModelPriceSuccess := common.GetModelPrice(textRequest.Model, false)
|
|
|
groupRatio := setting.GetGroupRatio(relayInfo.Group)
|
|
|
|
|
|
@@ -221,7 +222,7 @@ func TextHelper(c *gin.Context) (openaiErr *dto.OpenAIErrorWithStatusCode) {
|
|
|
if strings.HasPrefix(relayInfo.UpstreamModelName, "gpt-4o-audio") {
|
|
|
service.PostAudioConsumeQuota(c, relayInfo, usage.(*dto.Usage), preConsumedQuota, userQuota, modelRatio, groupRatio, modelPrice, getModelPriceSuccess, "")
|
|
|
} else {
|
|
|
- postConsumeQuota(c, relayInfo, textRequest.Model, usage.(*dto.Usage), ratio, preConsumedQuota, userQuota, modelRatio, groupRatio, modelPrice, getModelPriceSuccess, "")
|
|
|
+ postConsumeQuota(c, relayInfo, relayInfo.RecodeModelName, usage.(*dto.Usage), ratio, preConsumedQuota, userQuota, modelRatio, groupRatio, modelPrice, getModelPriceSuccess, "")
|
|
|
}
|
|
|
return nil
|
|
|
}
|