mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-28 01:53:53 +08:00
fix:选择仅上报聊天记录时,清除历史记忆
This commit is contained in:
+2
-1
@@ -406,8 +406,9 @@ public class AgentServiceImpl extends BaseServiceImpl<AgentDao, AgentEntity> imp
|
|||||||
existingEntity.setUpdatedAt(new Date());
|
existingEntity.setUpdatedAt(new Date());
|
||||||
|
|
||||||
// 更新记忆策略
|
// 更新记忆策略
|
||||||
if (existingEntity.getMemModelId() == null || existingEntity.getMemModelId().equals(Constant.MEMORY_NO_MEM)) {
|
|
||||||
// 删除所有记录
|
// 删除所有记录
|
||||||
|
if (existingEntity.getMemModelId() == null || existingEntity.getMemModelId().equals(Constant.MEMORY_NO_MEM)
|
||||||
|
|| existingEntity.getMemModelId().equals(Constant.MEMORY_MEM_REPORT_ONLY)) {
|
||||||
agentChatHistoryService.deleteByAgentId(existingEntity.getId(), true, true);
|
agentChatHistoryService.deleteByAgentId(existingEntity.getId(), true, true);
|
||||||
existingEntity.setSummaryMemory("");
|
existingEntity.setSummaryMemory("");
|
||||||
} else if (existingEntity.getChatHistoryConf() != null && existingEntity.getChatHistoryConf() == 1) {
|
} else if (existingEntity.getChatHistoryConf() != null && existingEntity.getChatHistoryConf() == 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user