feat(aichat): new template

This commit is contained in:
源文雨
2025-02-22 15:10:40 +09:00
parent fb29619b9e
commit 511f04c6f9
3 changed files with 13 additions and 7 deletions

View File

@@ -33,6 +33,7 @@ var (
"- 设置AI聊天温度80\n" +
"- 设置AI聊天密钥xxx\n" +
"- 设置AI聊天模型名xxx\n" +
"- 重置AI聊天系统提示词\n" +
"- 设置AI聊天系统提示词xxx\n" +
"- 设置AI聊天分隔符</think>(留空则清除)\n" +
"- 设置AI聊天(不)响应AT",
@@ -42,7 +43,7 @@ var (
var (
modelname = model.ModelDeepDeek
systemprompt = "你正在QQ群与用户聊天你将收到不同的用户发送的一至多条消息每条消息以【】包裹的用户名开始随后是消息内容。按自己的心情简短思考后条理清晰地回复。"
systemprompt = chat.SystemPrompt
sepstr = ""
noreplyat = false
)
@@ -266,6 +267,11 @@ func init() {
}
ctx.SendChain(message.Text("成功"))
})
en.OnFullMatch("重置AI聊天系统提示词", zero.OnlyPrivate, zero.SuperUserPermission).SetBlock(true).Handle(func(ctx *zero.Ctx) {
systemprompt = chat.SystemPrompt
_ = os.Remove(sf)
ctx.SendChain(message.Text("成功"))
})
en.OnPrefix("设置AI聊天分隔符", zero.OnlyPrivate, zero.SuperUserPermission).SetBlock(true).Handle(func(ctx *zero.Ctx) {
args := strings.TrimSpace(ctx.State["args"].(string))
if args == "" {