mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-16 08:04:10 +00:00
chore: update log content
This commit is contained in:
@@ -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,
|
||||||
|
@@ -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,
|
||||||
|
@@ -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
|
||||||
|
Reference in New Issue
Block a user