mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
fix(agent-ext-fields): 完善 agent 扩展字段前后端实现
- AgentServiceImpl/ConfigServiceImpl 后端逻辑 - edit.vue/roleConfig.vue 前端编辑与角色配置
This commit is contained in:
parent
d81a7fa31f
commit
f9f4e08b9a
4 changed files with 7 additions and 7 deletions
|
|
@ -97,7 +97,7 @@ public class AgentServiceImpl extends BaseServiceImpl<AgentDao, AgentEntity> imp
|
|||
agent.setChatHistoryConf(Constant.ChatHistoryConfEnum.IGNORE.getCode());
|
||||
}
|
||||
if (agent.getChatHistoryConf() == null) {
|
||||
agent.setChatHistoryConf(Constant.ChatHistoryConfEnum.RECORD_TEXT_AUDIO.getCode());
|
||||
agent.setChatHistoryConf(Constant.ChatHistoryConfEnum.RECORD_TEXT.getCode());
|
||||
}
|
||||
|
||||
// 查询上下文源配置
|
||||
|
|
@ -501,8 +501,8 @@ public class AgentServiceImpl extends BaseServiceImpl<AgentDao, AgentEntity> imp
|
|||
// 无记忆功能的模型,默认不记录聊天记录
|
||||
entity.setChatHistoryConf(0);
|
||||
} else {
|
||||
// 有记忆功能的模型,默认记录文本和语音
|
||||
entity.setChatHistoryConf(2);
|
||||
// 有记忆功能的模型,默认记录文本
|
||||
entity.setChatHistoryConf(1);
|
||||
}
|
||||
} else {
|
||||
entity.setChatHistoryConf(template.getChatHistoryConf());
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ public class ConfigServiceImpl implements ConfigService {
|
|||
} else if (agent.getMemModelId() != null
|
||||
&& !agent.getMemModelId().equals(Constant.MEMORY_NO_MEM)
|
||||
&& agent.getChatHistoryConf() == null) {
|
||||
chatHistoryConf = Constant.ChatHistoryConfEnum.RECORD_TEXT_AUDIO.getCode();
|
||||
chatHistoryConf = Constant.ChatHistoryConfEnum.RECORD_TEXT.getCode();
|
||||
}
|
||||
result.put("chat_history_conf", chatHistoryConf);
|
||||
// 如果客户端已实例化模型,则不返回
|
||||
|
|
|
|||
|
|
@ -490,7 +490,7 @@ async function onPickerConfirm(type: string, value: any, name: string) {
|
|||
break
|
||||
case 'memory':
|
||||
formData.value.memModelId = value
|
||||
formData.value.chatHistoryConf = value === 'Memory_nomem' ? 0 : 2
|
||||
formData.value.chatHistoryConf = value === 'Memory_nomem' ? 0 : 1
|
||||
displayNames.value.memory = name // 确保显示名称正确更新
|
||||
displayNames.value.report = reportOptions[1].name
|
||||
isVisibleReport.value = value !== 'Memory_nomem'
|
||||
|
|
|
|||
|
|
@ -954,8 +954,8 @@ export default {
|
|||
// 无记忆功能的模型,默认不记录聊天记录
|
||||
this.form.chatHistoryConf = 0;
|
||||
} else {
|
||||
// 有记忆功能的模型,默认记录文本和语音
|
||||
this.form.chatHistoryConf = 2;
|
||||
// 有记忆功能的模型,默认记录文本
|
||||
this.form.chatHistoryConf = 1;
|
||||
}
|
||||
if (value === "Memory_nomem" || value === "Memory_mem_report_only") {
|
||||
this.tempSummaryMemory = this.form.summaryMemory;
|
||||
|
|
|
|||
Loading…
Reference in a new issue