feat: publish sanitized custom.97 source
This commit is contained in:
1022 files changed
+69903
-19207
No files matched your search
@@ -1,7 +1,6 @@
|
||||
package model_setting
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"slices"
|
||||
"strings"
|
||||
@@ -124,12 +123,12 @@ func compiledThinkingBlacklist() ([]string, []*regexp.Regexp) {
|
||||
if after, ok := strings.CutPrefix(entry, thinkingBlacklistRegexPrefix); ok {
|
||||
pattern := after
|
||||
if pattern == "" {
|
||||
common.SysError(fmt.Sprintf("invalid thinking_model_blacklist regex %q: pattern is empty", entry))
|
||||
common.SysError(common.LogText("invalid thinking_model_blacklist regex %q: pattern is empty", entry))
|
||||
continue
|
||||
}
|
||||
re, err := regexp.Compile(pattern)
|
||||
if err != nil {
|
||||
common.SysError(fmt.Sprintf("invalid thinking_model_blacklist regex %q: %v", entry, err))
|
||||
common.SysError(common.LogText("invalid thinking_model_blacklist regex %q: %v", entry, err))
|
||||
continue
|
||||
}
|
||||
regexes = append(regexes, re)
|
||||
|
||||
Reference in new issue
Block a user