summaryrefslogtreecommitdiff
path: root/models
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2026-03-15 10:55:07 +0300
committerGrail Finder <wohilas@gmail.com>2026-03-15 10:55:07 +0300
commit7e346b5e1971c21d24945c2f09c60b7463a619d1 (patch)
treea2ab34d1216cbc3c736c7307aa47644ca6bf3b14 /models
parent1396b3eb05c32d868a3e07b8f60813f28d2042f8 (diff)
Refactor: deal with unused code
Diffstat (limited to 'models')
-rw-r--r--models/consts.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/models/consts.go b/models/consts.go
index 14f1a49..da664f9 100644
--- a/models/consts.go
+++ b/models/consts.go
@@ -1,5 +1,7 @@
package models
+import "regexp"
+
const (
LoadedMark = "(loaded) "
ToolRespMultyType = "multimodel_content"
@@ -13,3 +15,17 @@ const (
APITypeChat APIType = iota
APITypeCompletion
)
+
+var (
+ ToolCallRE = regexp.MustCompile(`__tool_call__\s*([\s\S]*?)__tool_call__`)
+ QuotesRE = regexp.MustCompile(`(".*?")`)
+ StarRE = regexp.MustCompile(`(\*.*?\*)`)
+ ThinkRE = regexp.MustCompile(`(?s)<think>.*?</think>`)
+ CodeBlockRE = regexp.MustCompile(`(?s)\x60{3}(?:.*?)\n(.*?)\n\s*\x60{3}\s*`)
+ SingleBacktickRE = regexp.MustCompile(`\x60([^\x60]*)\x60`)
+ RoleRE = regexp.MustCompile(`^(\w+):`)
+)
+
+var (
+ SysLabels = []string{"assistant"}
+)