chore: log format

This commit is contained in:
CalciumIon 2024-07-18 00:41:31 +08:00
parent b0d5491a2a
commit fae918c055
2 changed files with 2 additions and 2 deletions

View File

@ -179,7 +179,7 @@ func ImageHelper(c *gin.Context, relayMode int) *dto.OpenAIErrorWithStatusCode {
quality = "hd"
}
logContent := fmt.Sprintf(", 大小 %s, 品质 %s", imageRequest.Size, quality)
logContent := fmt.Sprintf("大小 %s, 品质 %s", imageRequest.Size, quality)
postConsumeQuota(c, relayInfo, imageRequest.Model, usage, 0, 0, userQuota, 0, groupRatio, modelPrice, true, logContent)
return nil

View File

@ -339,7 +339,7 @@ func postConsumeQuota(ctx *gin.Context, relayInfo *relaycommon.RelayInfo, modelN
logContent += fmt.Sprintf(",模型 %s", modelName)
}
if extraContent != "" {
logContent += extraContent
logContent += ", " + extraContent
}
other := service.GenerateTextOtherInfo(ctx, relayInfo, modelRatio, groupRatio, completionRatio, modelPrice)
model.RecordConsumeLog(ctx, relayInfo.UserId, relayInfo.ChannelId, promptTokens, completionTokens, logModel,