Based on QuantumNous/new-api v1.0.0-rc.36 (shallow history squashed). - CNY quota display mode: RMB-denominated top-up and crediting across Epay/Waffo channels - New CheckinButton in both authenticated and public headers (Turnstile supported) - New /subscribe page with public plan snapshot, Alipay/balance payment, auto group upgrade/reset - New /docs 12-section beginner guide with anchor navigation - New home PromoBanner linking to /docs; i18n synced (en/zh/zh-TW/fr/ja/ru/vi) - README: document custom features, live demo https://ai.88531.cn
33 lines
794 B
Go
33 lines
794 B
Go
package operation_setting
|
|
|
|
import "strings"
|
|
|
|
var DemoSiteEnabled = false
|
|
var SelfUseModeEnabled = false
|
|
|
|
var AutomaticDisableKeywords = []string{
|
|
"Your credit balance is too low",
|
|
"This organization has been disabled.",
|
|
"You exceeded your current quota",
|
|
"Permission denied",
|
|
"The security token included in the request is invalid",
|
|
"Operation not allowed",
|
|
"Your account is not authorized",
|
|
}
|
|
|
|
func AutomaticDisableKeywordsToString() string {
|
|
return strings.Join(AutomaticDisableKeywords, "\n")
|
|
}
|
|
|
|
func AutomaticDisableKeywordsFromString(s string) {
|
|
AutomaticDisableKeywords = []string{}
|
|
ak := strings.SplitSeq(s, "\n")
|
|
for k := range ak {
|
|
k = strings.TrimSpace(k)
|
|
k = strings.ToLower(k)
|
|
if k != "" {
|
|
AutomaticDisableKeywords = append(AutomaticDisableKeywords, k)
|
|
}
|
|
}
|
|
}
|