mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-03-30 05:41:37 +00:00
22 lines
487 B
Go
22 lines
487 B
Go
package operation_setting
|
|
|
|
import "github.com/QuantumNous/new-api/setting/config"
|
|
|
|
type QuotaSetting struct {
|
|
EnableFreeModelPreConsume bool `json:"enable_free_model_pre_consume"` // 是否对免费模型启用预消耗
|
|
}
|
|
|
|
// 默认配置
|
|
var quotaSetting = QuotaSetting{
|
|
EnableFreeModelPreConsume: true,
|
|
}
|
|
|
|
func init() {
|
|
// 注册到全局配置管理器
|
|
config.GlobalConfig.Register("quota_setting", "aSetting)
|
|
}
|
|
|
|
func GetQuotaSetting() *QuotaSetting {
|
|
return "aSetting
|
|
}
|