包含Go API项目的所有源代码、配置文件、Docker配置、文档和前端资源 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
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.Split(s, "\n")
|
|
for _, k := range ak {
|
|
k = strings.TrimSpace(k)
|
|
k = strings.ToLower(k)
|
|
if k != "" {
|
|
AutomaticDisableKeywords = append(AutomaticDisableKeywords, k)
|
|
}
|
|
}
|
|
}
|