Documentation ¶
Index ¶
- Variables
- func GetApproximateTokenEnabled() bool
- func GetAutomaticDisableChannelEnabled() bool
- func GetAutomaticEnableChannelWhenTestSucceedEnabled() bool
- func GetBillingEnabled() bool
- func GetDefaultChannelModelMapping() map[int]map[string]string
- func GetDefaultChannelModels() map[int][]string
- func GetDefaultGroupQPM() int64
- func GetDisableServe() bool
- func GetGeminiSafetySetting() string
- func GetGeminiVersion() string
- func GetGlobalAPIRateLimitNum() int64
- func GetGroupMaxTokenNum() int32
- func GetLogDetailStorageHours() int64
- func GetRetryTimes() int64
- func SetApproximateTokenEnabled(enabled bool)
- func SetAutomaticDisableChannelEnabled(enabled bool)
- func SetAutomaticEnableChannelWhenTestSucceedEnabled(enabled bool)
- func SetBillingEnabled(enabled bool)
- func SetDefaultChannelModelMapping(mapping map[int]map[string]string)
- func SetDefaultChannelModels(models map[int][]string)
- func SetDefaultGroupQPM(qpm int64)
- func SetDisableServe(disabled bool)
- func SetGeminiSafetySetting(setting string)
- func SetGeminiVersion(version string)
- func SetGlobalAPIRateLimitNum(num int64)
- func SetGroupMaxTokenNum(num int32)
- func SetLogDetailStorageHours(hours int64)
- func SetRetryTimes(times int64)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( OptionMap map[string]string OptionMapRWMutex sync.RWMutex )
View Source
var (
DebugEnabled, _ = strconv.ParseBool(os.Getenv("DEBUG"))
DebugSQLEnabled, _ = strconv.ParseBool(os.Getenv("DEBUG_SQL"))
)
View Source
var ( // 代理地址 RelayProxy = env.String("RELAY_PROXY", "") // 用户内容请求代理地址 UserContentRequestProxy = env.String("USER_CONTENT_REQUEST_PROXY", "") // 用户内容请求超时时间,单位为秒 UserContentRequestTimeout = env.Int("USER_CONTENT_REQUEST_TIMEOUT", 30) )
View Source
var AdminKey = env.String("ADMIN_KEY", "")
View Source
var DisableAutoMigrateDB = os.Getenv("DISABLE_AUTO_MIGRATE_DB") == "true"
View Source
var OnlyOneLogFile = env.Bool("ONLY_ONE_LOG_FILE", false)
View Source
var RateLimitKeyExpirationDuration = 20 * time.Minute
View Source
var RelayTimeout = env.Int("RELAY_TIMEOUT", 0) // unit is second
Functions ¶
func GetApproximateTokenEnabled ¶
func GetApproximateTokenEnabled() bool
func GetAutomaticDisableChannelEnabled ¶
func GetAutomaticDisableChannelEnabled() bool
func GetAutomaticEnableChannelWhenTestSucceedEnabled ¶
func GetAutomaticEnableChannelWhenTestSucceedEnabled() bool
func GetBillingEnabled ¶
func GetBillingEnabled() bool
func GetDefaultChannelModels ¶
func GetDisableServe ¶
func GetDisableServe() bool
func GetGeminiSafetySetting ¶
func GetGeminiSafetySetting() string
func GetGeminiVersion ¶
func GetGeminiVersion() string
func GetLogDetailStorageHours ¶
func GetLogDetailStorageHours() int64
func GetRetryTimes ¶
func GetRetryTimes() int64
func SetApproximateTokenEnabled ¶
func SetApproximateTokenEnabled(enabled bool)
func SetAutomaticDisableChannelEnabled ¶
func SetAutomaticDisableChannelEnabled(enabled bool)
func SetAutomaticEnableChannelWhenTestSucceedEnabled ¶
func SetAutomaticEnableChannelWhenTestSucceedEnabled(enabled bool)
func SetBillingEnabled ¶
func SetBillingEnabled(enabled bool)
func SetDefaultChannelModels ¶
func SetDefaultGroupQPM ¶
func SetDefaultGroupQPM(qpm int64)
func SetDisableServe ¶
func SetDisableServe(disabled bool)
func SetGeminiSafetySetting ¶
func SetGeminiSafetySetting(setting string)
func SetGeminiVersion ¶
func SetGeminiVersion(version string)
func SetGlobalAPIRateLimitNum ¶
func SetGlobalAPIRateLimitNum(num int64)
func SetGroupMaxTokenNum ¶
func SetGroupMaxTokenNum(num int32)
func SetLogDetailStorageHours ¶
func SetLogDetailStorageHours(hours int64)
func SetRetryTimes ¶
func SetRetryTimes(times int64)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.