mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 07:03:53 +08:00
修复添加和修改声纹选择的时候,编辑的声纹不在里面,导致无法显示内容的问题
--agent.js 增加查询音频内容的接口 --VoicePrintDialog.vue 修复添加和修改声纹选择的时候,编辑的声纹不在里面,导致无法显示内容的问题
This commit is contained in:
@@ -250,4 +250,19 @@ export default {
|
||||
});
|
||||
}).send();
|
||||
},
|
||||
// 获取指定智能体用户类型聊天记录
|
||||
getContentByAudioId(id,callback) {
|
||||
RequestService.sendRequest()
|
||||
.url(`${getServiceUrl()}/agent/${id}/chat-history/audio`)
|
||||
.method('GET')
|
||||
.success((res) => {
|
||||
RequestService.clearRequestTime();
|
||||
callback(res);
|
||||
})
|
||||
.networkFail(() => {
|
||||
RequestService.reAjaxFun(() => {
|
||||
this.getContentByAudioId(id,callback);
|
||||
});
|
||||
}).send();
|
||||
},
|
||||
}
|
||||
|
||||
@@ -170,6 +170,19 @@ export default {
|
||||
}));
|
||||
}))
|
||||
}
|
||||
},
|
||||
'form.audioId'(newVal) {
|
||||
if (newVal == null || newVal == "") {
|
||||
return
|
||||
}
|
||||
if (this.valueTypeOptions.some(item => item.audioId === newVal)) {
|
||||
return;
|
||||
}
|
||||
api.agent.getContentByAudioId(newVal, ((data) => {
|
||||
this.valueTypeOptions.push({
|
||||
audioId: newVal, content: data.data.data
|
||||
})
|
||||
}))
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user