Skip to content

Commit

Permalink
fix(model): add usage log failed
Browse files Browse the repository at this point in the history
  • Loading branch information
OrenZhang committed Mar 3, 2025
1 parent a82bf87 commit 909748b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/apps/usage/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def record(
total_price = prompt_price + completion_price
UserBalance.objects.filter(user_id=user_id).update(balance=F("balance") - total_price)
logger.info(
"[usage log] user: %s, tokens: %d/%s, cost: %.4f", user_info, prompt_tokens, completion_tokens, total_price
"[usage log] user: %s, tokens: %d/%s, cost: %s", user_info, prompt_tokens, completion_tokens, total_price
)
return log

Expand Down

0 comments on commit 909748b

Please sign in to comment.