Some checks failed
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (amd64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Build & push (arm64) [native] (push) Has been cancelled
Publish Docker image (Multi Registries, native amd64+arm64) / Create multi-arch manifests (Docker Hub) (push) Has been cancelled
Build Electron App / build (windows-latest) (push) Has been cancelled
Build Electron App / release (push) Has been cancelled
Release (Linux, macOS, Windows) / Linux Release (push) Has been cancelled
Release (Linux, macOS, Windows) / macOS Release (push) Has been cancelled
Release (Linux, macOS, Windows) / Windows Release (push) Has been cancelled
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
|
|
}
|