feat: 实现 LLM 文言文摘要生成,优化 Session 创建逻辑
Some checks failed
Release / build (push) Failing after 3h11m18s

This commit is contained in:
2026-04-27 08:58:08 +08:00
parent f41aa8b453
commit 124b0baa26
7 changed files with 126 additions and 24 deletions

View File

@@ -72,7 +72,7 @@ func main() {
dbPath = memory.GetDefaultDBPath()
}
fmt.Printf("初始化记忆体db_path: %s\n", dbPath)
if err := memory.Init(memory.WithDBPath(dbPath)); err != nil {
if err := memory.Init(agentLoop, memory.WithDBPath(dbPath)); err != nil {
fmt.Fprintf(os.Stderr, "警告:初始化记忆体失败: %v将使用无记忆模式\n", err)
} else {
fmt.Println("记忆体初始化成功")
@@ -435,13 +435,8 @@ func handleTTSCommandSimple(input string) {
}
func handleNewSessionCommand(rl *internal.Readline, basePrompt string) {
uuid, err := memory.CreateNewSession()
if err != nil {
fmt.Printf("创建新会话失败: %v\n", err)
return
}
fmt.Printf("已创建新会话: %s\n", uuid)
currentSession = nil
fmt.Println("已重置会话,输入聊天消息后将创建新会话")
}
func handleMemoryCommand(input string) {