refactor(group): update user group handling to utilize userUsableGroups directly and add GetUserGroupRatio function

This commit is contained in:
CaIon
2025-10-30 21:16:42 +08:00
parent f1ac5606ee
commit 52d9b8cc78
4 changed files with 15 additions and 3 deletions

View File

@@ -94,6 +94,7 @@ func Distribute() func(c *gin.Context) {
return
}
usingGroup = playgroundRequest.Group
common.SetContextKey(c, constant.ContextKeyUsingGroup, usingGroup)
}
}
channel, selectGroup, err = service.CacheGetRandomSatisfiedChannel(c, usingGroup, modelRequest.Model, 0)