fix: fix used amount not correct

This commit is contained in:
JustSong 2023-06-20 21:05:07 +08:00
parent 14b85318a6
commit ced9f060c7

View File

@ -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,