feat: 增加重置模型倍率功能 (close #62)

This commit is contained in:
1808837298@qq.com
2024-05-24 15:28:16 +08:00
parent 7e26238231
commit 36fac2baa2
9 changed files with 2811 additions and 185 deletions

View File

@@ -200,19 +200,3 @@ func RetrieveModel(c *gin.Context) {
})
}
}
func GetPricing(c *gin.Context) {
userId := c.GetInt("id")
// if no login, get default group ratio
groupRatio := common.GetGroupRatio("default")
group, err := model.CacheGetUserGroup(userId)
if err == nil {
groupRatio = common.GetGroupRatio(group)
}
pricing := model.GetPricing(group)
c.JSON(200, gin.H{
"success": true,
"data": pricing,
"group_ratio": groupRatio,
})
}