支持工具调用:三个AI角色配置、工具注册表与流式工具轮

This commit is contained in:
2026-08-14 16:55:48 +08:00
parent ce49bb9c1e
commit 1c9e98ddb0
11 changed files with 491 additions and 28 deletions
+14
View File
@@ -67,6 +67,20 @@ func main() {
}
fmt.Print(text)
},
func(name, args string) {
if resetStyle {
fmt.Print("\x1b[0m")
thinkStyle, resetStyle = false, false
}
fmt.Printf("🔧 调用工具: %s %s\n", name, args)
},
func(text string) {
if !thinkStyle {
fmt.Print("\x1b[3;90m🔧 ")
thinkStyle, resetStyle = true, true
}
fmt.Print(text)
},
)
fmt.Println()
if err != nil {