summaryrefslogtreecommitdiff
path: root/models/consts.go
blob: da664f933f83f781dad4505c1db70af343b947d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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"}
)