chore: update log content

This commit is contained in:
JustSong
2025-01-31 20:15:04 +08:00
parent 0230d36643
commit 0bab887b2d
3 changed files with 3 additions and 3 deletions

View File

@@ -122,7 +122,7 @@ func postConsumeQuota(ctx context.Context, usage *relaymodel.Usage, meta *meta.M
if err != nil { if err != nil {
logger.Error(ctx, "error update user quota cache: "+err.Error()) logger.Error(ctx, "error update user quota cache: "+err.Error())
} }
logContent := fmt.Sprintf("%.2f × %.2f × %.2f", modelRatio, groupRatio, completionRatio) logContent := fmt.Sprintf("倍率:%.2f × %.2f × %.2f", modelRatio, groupRatio, completionRatio)
model.RecordConsumeLog(ctx, &model.Log{ model.RecordConsumeLog(ctx, &model.Log{
UserId: meta.UserId, UserId: meta.UserId,
ChannelId: meta.ChannelId, ChannelId: meta.ChannelId,

View File

@@ -210,7 +210,7 @@ func RelayImageHelper(c *gin.Context, relayMode int) *relaymodel.ErrorWithStatus
} }
if quota != 0 { if quota != 0 {
tokenName := c.GetString(ctxkey.TokenName) tokenName := c.GetString(ctxkey.TokenName)
logContent := fmt.Sprintf("%.2f × %.2f", modelRatio, groupRatio) logContent := fmt.Sprintf("倍率:%.2f × %.2f", modelRatio, groupRatio)
model.RecordConsumeLog(ctx, &model.Log{ model.RecordConsumeLog(ctx, &model.Log{
UserId: meta.UserId, UserId: meta.UserId,
ChannelId: meta.ChannelId, ChannelId: meta.ChannelId,

View File

@@ -99,7 +99,7 @@ function getColorByElapsedTime(elapsedTime) {
function renderDetail(log) { function renderDetail(log) {
return ( return (
<> <>
倍率{log.content} {log.content}
<br /> <br />
{log.elapsed_time && ( {log.elapsed_time && (
<Label <Label