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:
Laisky.Cai
2024-03-01 13:49:23 +00:00
parent ba827b95e3
commit dbe3930a8c
5 changed files with 24 additions and 8 deletions

View File

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