feat: 记录请求的token用量

This commit is contained in:
1808837298@qq.com
2024-03-04 14:58:30 +08:00
parent 5cd2c572c2
commit 672f261c3e
2 changed files with 6 additions and 4 deletions
+1 -1
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)
})
}
}