From ced9f060c7d1f1f4544f5535f4a1e61eabeba5ff Mon Sep 17 00:00:00 2001 From: JustSong Date: Tue, 20 Jun 2023 21:05:07 +0800 Subject: [PATCH] fix: fix used amount not correct --- controller/billing.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controller/billing.go b/controller/billing.go index 18a34dc9..8197bc88 100644 --- a/controller/billing.go +++ b/controller/billing.go @@ -48,6 +48,9 @@ func GetUsage(c *gin.Context) { return } amount := float64(quota) + if common.DisplayInCurrencyEnabled { + amount /= common.QuotaPerUnit + } usage := OpenAIUsageResponse{ Object: "list", TotalUsage: amount,