summaryrefslogtreecommitdiff
path: root/models/consts.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/consts.go')
-rw-r--r--models/consts.go31
1 files changed, 31 insertions, 0 deletions
diff --git a/models/consts.go b/models/consts.go
new file mode 100644
index 0000000..da664f9
--- /dev/null
+++ b/models/consts.go
@@ -0,0 +1,31 @@
+package models
+
+import "regexp"
+
+const (
+ LoadedMark = "(loaded) "
+ ToolRespMultyType = "multimodel_content"
+ DefaultFirstMsg = "Hello! What can I do for you?"
+ BasicSysMsg = "Large Language Model that helps user with any of his requests."
+)
+
+type APIType int
+
+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"}
+)