mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-28 10:03:54 +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值
|
// 根据记忆模型类型设置默认的chatHistoryConf值
|
||||||
if (template.getMemModelId() != null) {
|
if (template.getMemModelId() != null) {
|
||||||
if (template.getMemModelId().equals("Memory_mem0ai")
|
if (template.getMemModelId().equals("Memory_nomem")) {
|
||||||
|| 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")) {
|
|
||||||
entity.setChatHistoryConf(0);
|
entity.setChatHistoryConf(0);
|
||||||
} else {
|
} else {
|
||||||
entity.setChatHistoryConf(template.getChatHistoryConf());
|
// 有记忆功能的模型,默认记录文本和语音
|
||||||
|
entity.setChatHistoryConf(2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
entity.setChatHistoryConf(template.getChatHistoryConf());
|
entity.setChatHistoryConf(template.getChatHistoryConf());
|
||||||
|
|||||||
@@ -606,10 +606,10 @@ export default {
|
|||||||
}
|
}
|
||||||
if (type === "Memory") {
|
if (type === "Memory") {
|
||||||
if (value === "Memory_nomem") {
|
if (value === "Memory_nomem") {
|
||||||
|
// 无记忆功能的模型,默认不记录聊天记录
|
||||||
this.form.chatHistoryConf = 0;
|
this.form.chatHistoryConf = 0;
|
||||||
} else if (value === "Memory_mem0ai" || value === "Memory_mem_local_short") {
|
} else {
|
||||||
this.form.chatHistoryConf = 2;
|
// 有记忆功能的模型,默认记录文本和语音
|
||||||
} else if (this.form.chatHistoryConf === 0 || this.form.chatHistoryConf === null) {
|
|
||||||
this.form.chatHistoryConf = 2;
|
this.form.chatHistoryConf = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user