mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-10 10:33:41 +08:00
fix: Switch to channel-ratio
- Use channel ratios instead of group ratios in all applicable places - Start using the lowest channel ratio of the specified channel's groups
This commit is contained in:
@@ -35,7 +35,8 @@ func RelayTextHelper(c *gin.Context) *model.ErrorWithStatusCode {
|
||||
meta.ActualModelName = textRequest.Model
|
||||
// get model ratio & group ratio
|
||||
modelRatio := common.GetModelRatio(textRequest.Model)
|
||||
groupRatio := common.GetGroupRatio(meta.Group)
|
||||
// groupRatio := common.GetGroupRatio(meta.Group)
|
||||
groupRatio := meta.ChannelRatio
|
||||
ratio := modelRatio * groupRatio
|
||||
// pre-consume quota
|
||||
promptTokens := getPromptTokens(textRequest, meta.Mode)
|
||||
|
||||
Reference in New Issue
Block a user