summaryrefslogtreecommitdiff
path: root/tools.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-02-02 13:25:24 +0300
committerGrail Finder <wohilas@gmail.com>2025-02-02 13:25:24 +0300
commit7ca188dcdc9e98e3222a05a160006c76c1b84862 (patch)
tree1d9659e19315ae80c8a025087797d1dc0fa1abe6 /tools.go
parent4e9b31baf885c6889d685b255ceb9bee6db7c06b (diff)
Feat: code block copy; model update; [WIP:broke tables]
Diffstat (limited to 'tools.go')
-rw-r--r--tools.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/tools.go b/tools.go
index 8fda0ab..94c1b16 100644
--- a/tools.go
+++ b/tools.go
@@ -9,11 +9,13 @@ import (
)
var (
- toolCallRE = regexp.MustCompile(`__tool_call__\s*([\s\S]*?)__tool_call__`)
- quotesRE = regexp.MustCompile(`(".*?")`)
- starRE = regexp.MustCompile(`(\*.*?\*)`)
- thinkRE = regexp.MustCompile(`(<think>.*?</think>)`)
- // codeBlokRE = regexp.MustCompile(`(\x60\x60\x60.*?\x60\x60\x60)`)
+ toolCallRE = regexp.MustCompile(`__tool_call__\s*([\s\S]*?)__tool_call__`)
+ quotesRE = regexp.MustCompile(`(".*?")`)
+ starRE = regexp.MustCompile(`(\*.*?\*)`)
+ thinkRE = regexp.MustCompile(`(<think>.*?</think>)`)
+ codeBlockRE = regexp.MustCompile(`(?s)\x60{3}(?:.*?)\n(.*?)\n\s*\x60{3}\s*`)
+ // codeBlockRE = regexp.MustCompile("```\s*([\s\S]*?)```")
+ // codeBlockRE = regexp.MustCompile(`(\x60\x60\x60.*?\x60\x60\x60)`)
basicSysMsg = `Large Language Model that helps user with any of his requests.`
toolSysMsg = `You're a helpful assistant.
# Tools