Bläddra i källkod

fix: fix used amount not correct

JustSong 2 år sedan
förälder
incheckning
ced9f060c7
1 ändrade filer med 3 tillägg och 0 borttagningar
  1. 3 0
      controller/billing.go

+ 3 - 0
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,