mirror of
				https://github.com/songquanpeng/one-api.git
				synced 2025-11-04 15:53:42 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			292 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			292 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package common
 | 
						||
 | 
						||
import (
 | 
						||
	"fmt"
 | 
						||
	"github.com/songquanpeng/one-api/common/config"
 | 
						||
)
 | 
						||
 | 
						||
func LogQuota(quota int64) string {
 | 
						||
	if config.DisplayInCurrencyEnabled {
 | 
						||
		return fmt.Sprintf("$%.6f 额度", float64(quota)/config.QuotaPerUnit)
 | 
						||
	} else {
 | 
						||
		return fmt.Sprintf("%d 点额度", quota)
 | 
						||
	}
 | 
						||
}
 |