feat: 记录请求的token用量

This commit is contained in:
1808837298@qq.com
2024-03-04 14:58:30 +08:00
parent 1ad1112351
commit 912f46fcd2
2 changed files with 6 additions and 4 deletions

View File

@@ -85,7 +85,7 @@ func RecordConsumeLog(ctx context.Context, userId int, channelId int, promptToke
}
if common.DataExportEnabled {
common.SafeGoroutine(func() {
LogQuotaData(userId, username, modelName, quota, common.GetTimestamp())
LogQuotaData(userId, username, modelName, quota, common.GetTimestamp(), promptTokens+completionTokens)
})
}
}