mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 07:03:53 +08:00
fix:设置有记忆的模型为默认时,chatHistoryConf=2
This commit is contained in:
+4
-6
@@ -398,14 +398,12 @@ public class AgentServiceImpl extends BaseServiceImpl<AgentDao, AgentEntity> imp
|
||||
|
||||
// 根据记忆模型类型设置默认的chatHistoryConf值
|
||||
if (template.getMemModelId() != null) {
|
||||
if (template.getMemModelId().equals("Memory_mem0ai")
|
||||
|| template.getMemModelId().equals("Memory_mem_local_short")) {
|
||||
// 当记忆模型是Memory_mem0ai或Memory_mem_local_short时,默认chatHistoryConf设为2
|
||||
entity.setChatHistoryConf(2);
|
||||
} else if (template.getMemModelId().equals("Memory_nomem")) {
|
||||
if (template.getMemModelId().equals("Memory_nomem")) {
|
||||
// 无记忆功能的模型,默认不记录聊天记录
|
||||
entity.setChatHistoryConf(0);
|
||||
} else {
|
||||
entity.setChatHistoryConf(template.getChatHistoryConf());
|
||||
// 有记忆功能的模型,默认记录文本和语音
|
||||
entity.setChatHistoryConf(2);
|
||||
}
|
||||
} else {
|
||||
entity.setChatHistoryConf(template.getChatHistoryConf());
|
||||
|
||||
@@ -606,10 +606,10 @@ export default {
|
||||
}
|
||||
if (type === "Memory") {
|
||||
if (value === "Memory_nomem") {
|
||||
// 无记忆功能的模型,默认不记录聊天记录
|
||||
this.form.chatHistoryConf = 0;
|
||||
} else if (value === "Memory_mem0ai" || value === "Memory_mem_local_short") {
|
||||
this.form.chatHistoryConf = 2;
|
||||
} else if (this.form.chatHistoryConf === 0 || this.form.chatHistoryConf === null) {
|
||||
} else {
|
||||
// 有记忆功能的模型,默认记录文本和语音
|
||||
this.form.chatHistoryConf = 2;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user