config

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DebugEnabled    = env.Bool("DEBUG", false)
	DebugSQLEnabled = env.Bool("DEBUG_SQL", false)
)
View Source
var (
	DisableAutoMigrateDB = env.Bool("DISABLE_AUTO_MIGRATE_DB", false)
	AdminKey             = os.Getenv("ADMIN_KEY")
	FfprobeEnabled       = env.Bool("FFPROBE_ENABLED", false)
)

Functions

func GetBillingEnabled

func GetBillingEnabled() bool

func GetCleanLogBatchSize added in v0.1.5

func GetCleanLogBatchSize() int64

func GetDefaultChannelModelMapping

func GetDefaultChannelModelMapping() map[int]map[string]string

func GetDefaultChannelModels

func GetDefaultChannelModels() map[int][]string

func GetDisableModelConfig

func GetDisableModelConfig() bool

func GetDisableServe

func GetDisableServe() bool

func GetEnableModelErrorAutoBan

func GetEnableModelErrorAutoBan() bool

func GetGeminiSafetySetting

func GetGeminiSafetySetting() string

func GetGroupConsumeLevelRatio

func GetGroupConsumeLevelRatio() map[float64]float64

func GetGroupConsumeLevelRatioStringKeyMap

func GetGroupConsumeLevelRatioStringKeyMap() map[string]float64

func GetGroupMaxTokenNum

func GetGroupMaxTokenNum() int64

GetGroupMaxTokenNum returns max number of tokens per group, 0 means unlimited

func GetIPGroupsBanThreshold added in v0.1.5

func GetIPGroupsBanThreshold() int64

func GetIPGroupsThreshold added in v0.1.5

func GetIPGroupsThreshold() int64

func GetInternalToken

func GetInternalToken() string

func GetLogContentStorageHours added in v0.1.5

func GetLogContentStorageHours() int64

func GetLogDetailRequestBodyMaxSize

func GetLogDetailRequestBodyMaxSize() int64

func GetLogDetailResponseBodyMaxSize

func GetLogDetailResponseBodyMaxSize() int64

func GetLogDetailStorageHours

func GetLogDetailStorageHours() int64

func GetLogStorageHours

func GetLogStorageHours() int64

func GetModelErrorAutoBanRate

func GetModelErrorAutoBanRate() float64

func GetNotifyNote

func GetNotifyNote() string

func GetRetryTimes

func GetRetryTimes() int64

func GetSaveAllLogDetail

func GetSaveAllLogDetail() bool

func GetTimeoutWithModelType

func GetTimeoutWithModelType() map[int]int64

func SetBillingEnabled

func SetBillingEnabled(enabled bool)

func SetCleanLogBatchSize added in v0.1.5

func SetCleanLogBatchSize(size int64)

func SetDefaultChannelModelMapping

func SetDefaultChannelModelMapping(mapping map[int]map[string]string)

func SetDefaultChannelModels

func SetDefaultChannelModels(models map[int][]string)

func SetDisableServe

func SetDisableServe(disabled bool)

func SetEnableModelErrorAutoBan

func SetEnableModelErrorAutoBan(enabled bool)

func SetGeminiSafetySetting

func SetGeminiSafetySetting(setting string)

func SetGroupConsumeLevelRatio

func SetGroupConsumeLevelRatio(ratio map[float64]float64)

func SetGroupMaxTokenNum

func SetGroupMaxTokenNum(num int64)

func SetIPGroupsBanThreshold added in v0.1.5

func SetIPGroupsBanThreshold(threshold int64)

func SetIPGroupsThreshold added in v0.1.5

func SetIPGroupsThreshold(threshold int64)

func SetInternalToken

func SetInternalToken(token string)

func SetLogContentStorageHours added in v0.1.5

func SetLogContentStorageHours(hours int64)

func SetLogDetailRequestBodyMaxSize

func SetLogDetailRequestBodyMaxSize(size int64)

func SetLogDetailResponseBodyMaxSize

func SetLogDetailResponseBodyMaxSize(size int64)

func SetLogDetailStorageHours

func SetLogDetailStorageHours(hours int64)

func SetLogStorageHours

func SetLogStorageHours(hours int64)

func SetModelErrorAutoBanRate

func SetModelErrorAutoBanRate(rate float64)

func SetNotifyNote

func SetNotifyNote(note string)

func SetRetryTimes

func SetRetryTimes(times int64)

func SetSaveAllLogDetail

func SetSaveAllLogDetail(enabled bool)

func SetTimeoutWithModelType

func SetTimeoutWithModelType(timeout map[int]int64)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL