mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-14 23:00:27 +00:00
fix: fix used amount not correct
This commit is contained in:
@@ -48,6 +48,9 @@ func GetUsage(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
amount := float64(quota)
|
amount := float64(quota)
|
||||||
|
if common.DisplayInCurrencyEnabled {
|
||||||
|
amount /= common.QuotaPerUnit
|
||||||
|
}
|
||||||
usage := OpenAIUsageResponse{
|
usage := OpenAIUsageResponse{
|
||||||
Object: "list",
|
Object: "list",
|
||||||
TotalUsage: amount,
|
TotalUsage: amount,
|
||||||
|
Reference in New Issue
Block a user