mirror of
				https://github.com/linux-do/new-api.git
				synced 2025-11-04 13:23:42 +08:00 
			
		
		
		
	chore: log format
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user