feat: 记录请求的token用量
This commit is contained in:
1 parent
5cd2c572c2
commit
672f261c3e
2 files changed
+6
-4
No files matched your search
+1
-1
@@ -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)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user