mirror of
https://github.com/Zippland/Bubbles.git
synced 2026-01-19 09:41:17 +08:00
重构 ChatGPT 和 DeepSeek 类的初始化逻辑,新增最大历史消息数配置,优化消息处理逻辑,移除冗余代码,提升代码可读性。同时更新消息记录逻辑,确保消息记录功能正常。
This commit is contained in:
2
robot.py
2
robot.py
@@ -288,7 +288,6 @@ class Robot(Job):
|
||||
self.LOG.info(f"To {receiver}:\n{ats}\n{msg}")
|
||||
self.wcf.send_text(full_msg_content, receiver, at_list)
|
||||
|
||||
# ---- 修改记录逻辑 ----
|
||||
if self.message_summary: # 检查 message_summary 是否初始化成功
|
||||
# 确定机器人的名字
|
||||
robot_name = self.allContacts.get(self.wxid, "机器人")
|
||||
@@ -303,7 +302,6 @@ class Robot(Job):
|
||||
self.LOG.debug(f"已记录机器人发送的消息到 {receiver}")
|
||||
else:
|
||||
self.LOG.warning("MessageSummary 未初始化,无法记录发送的消息")
|
||||
# ---- 记录逻辑修改结束 ----
|
||||
|
||||
except Exception as e:
|
||||
self.LOG.error(f"发送消息失败: {e}")
|
||||
|
||||
Reference in New Issue
Block a user