diff options
Diffstat (limited to 'tools.go')
-rw-r--r-- | tools.go | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -1,7 +1,7 @@ package main import ( - "elefant/models" + "gf-lt/models" "fmt" "regexp" "strings" @@ -9,11 +9,16 @@ import ( ) var ( - toolCallRE = regexp.MustCompile(`__tool_call__\s*([\s\S]*?)__tool_call__`) - quotesRE = regexp.MustCompile(`(".*?")`) - starRE = regexp.MustCompile(`(\*.*?\*)`) - thinkRE = regexp.MustCompile(`(<think>\s*([\s\S]*?)</think>)`) - codeBlockRE = regexp.MustCompile(`(?s)\x60{3}(?:.*?)\n(.*?)\n\s*\x60{3}\s*`) + toolCallRE = regexp.MustCompile(`__tool_call__\s*([\s\S]*?)__tool_call__`) + quotesRE = regexp.MustCompile(`(".*?")`) + starRE = regexp.MustCompile(`(\*.*?\*)`) + thinkRE = regexp.MustCompile(`(<think>\s*([\s\S]*?)</think>)`) + codeBlockRE = regexp.MustCompile(`(?s)\x60{3}(?:.*?)\n(.*?)\n\s*\x60{3}\s*`) + rpDefenitionSysMsg = ` +For this roleplay immersion is at most importance. +Every character thinks and acts based on their personality and setting of the roleplay. +Meta discussions outside of roleplay is allowed if clearly labeled as out of character, for example: (ooc: {msg}) or <ooc>{msg}</ooc>. +` basicSysMsg = `Large Language Model that helps user with any of his requests.` toolSysMsg = `You can do functions call if needed. Your current tools: @@ -21,7 +26,7 @@ Your current tools: [ { "name":"recall", -"args": "topic", +"args": ["topic"], "when_to_use": "when asked about topic that user previously asked to memorise" }, { @@ -31,7 +36,7 @@ Your current tools: }, { "name":"recall_topics", -"args": null, +"args": [], "when_to_use": "to see what topics are saved in memory" } ] @@ -41,7 +46,7 @@ To make a function call return a json object within __tool_call__ tags; __tool_call__ { "name":"recall", -"args": "Adam's number" +"args": ["Adam's number"] } __tool_call__ </example_request> |