|
@@ -259,8 +259,9 @@ func relayHelper(c *gin.Context, relayMode int) *OpenAIErrorWithStatusCode {
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
common.SysError("Error consuming token remain quota: " + err.Error())
|
|
common.SysError("Error consuming token remain quota: " + err.Error())
|
|
|
}
|
|
}
|
|
|
|
|
+ tokenName := c.GetString("token_name")
|
|
|
userId := c.GetInt("id")
|
|
userId := c.GetInt("id")
|
|
|
- model.RecordLog(userId, model.LogTypeConsume, fmt.Sprintf("使用模型 %s 消耗 %d 点额度(模型倍率 %.2f,分组倍率 %.2f)", textRequest.Model, quota, modelRatio, groupRatio))
|
|
|
|
|
|
|
+ model.RecordLog(userId, model.LogTypeConsume, fmt.Sprintf("通过令牌「%s」使用模型 %s 消耗 %d 点额度(模型倍率 %.2f,分组倍率 %.2f)", tokenName, textRequest.Model, quota, modelRatio, groupRatio))
|
|
|
model.UpdateUserUsedQuotaAndRequestCount(userId, quota)
|
|
model.UpdateUserUsedQuotaAndRequestCount(userId, quota)
|
|
|
channelId := c.GetInt("channel_id")
|
|
channelId := c.GetInt("channel_id")
|
|
|
model.UpdateChannelUsedQuota(channelId, quota)
|
|
model.UpdateChannelUsedQuota(channelId, quota)
|