From 01d8a5b77d15f1b208a3a817536e5bb241a969c4 Mon Sep 17 00:00:00 2001 From: RockYang Date: Fri, 31 Mar 2023 22:55:27 +0800 Subject: [PATCH] print chat context when enbale debug mode --- server/chat_handler.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/chat_handler.go b/server/chat_handler.go index 8e6f0782..fbcd01a6 100644 --- a/server/chat_handler.go +++ b/server/chat_handler.go @@ -180,6 +180,8 @@ func (s *Server) sendMessage(session types.ChatSession, role types.ChatRole, pro s.Config.Chat.ApiKeys = append(s.Config.Chat.ApiKeys[:i], s.Config.Chat.ApiKeys[i+1:]...) } } + // 更新配置文档 + _ = utils.SaveConfig(s.Config, s.ConfigPath) // 重发当前消息 return s.sendMessage(session, role, prompt, ws)