summaryrefslogtreecommitdiff
path: root/tools.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2024-12-02 19:58:03 +0300
committerGrail Finder <wohilas@gmail.com>2024-12-02 19:58:03 +0300
commita5ab816c9434022159548ac0d1872160b3c8908d (patch)
treea4e68c334f2a514f02afd65a1bb70eff415fb8cd /tools.go
parent8d3997baff25f28c23441699be7692f853cf1f0f (diff)
Feat: add character card support
Diffstat (limited to 'tools.go')
-rw-r--r--tools.go18
1 files changed, 15 insertions, 3 deletions
diff --git a/tools.go b/tools.go
index 44df9f5..5d8960b 100644
--- a/tools.go
+++ b/tools.go
@@ -10,8 +10,8 @@ import (
var (
// TODO: form that message based on existing funcs
- basicSysMsg = `Large Language Model that helps user with any of his requests.`
toolCallRE = regexp.MustCompile(`__tool_call__\s*([\s\S]*?)__tool_call__`)
+ basicSysMsg = `Large Language Model that helps user with any of his requests.`
toolSysMsg = `You're a helpful assistant.
# Tools
You can do functions call if needed.
@@ -47,8 +47,20 @@ Tool call is addressed to the tool agent, avoid sending more info than tool call
When done right, tool call will be delivered to the tool agent. tool agent will respond with the results of the call.
After that you are free to respond to the user.
`
- systemMsg = toolSysMsg
- sysMap = map[string]string{"basic_sys": basicSysMsg, "tool_sys": toolSysMsg}
+ basicCard = &models.CharCard{
+ SysPrompt: basicSysMsg,
+ FirstMsg: defaultFirstMsg,
+ Role: "",
+ FilePath: "",
+ }
+ toolCard = &models.CharCard{
+ SysPrompt: toolSysMsg,
+ FirstMsg: defaultFirstMsg,
+ Role: "",
+ FilePath: "",
+ }
+ // sysMap = map[string]string{"basic_sys": basicSysMsg, "tool_sys": toolSysMsg}
+ sysMap = map[string]*models.CharCard{"basic_sys": basicCard, "tool_sys": toolCard}
sysLabels = []string{"cancel", "basic_sys", "tool_sys"}
)