diff --git a/main/manager-web/src/apis/module/user.js b/main/manager-web/src/apis/module/user.js index ddec6f04..314c00a3 100755 --- a/main/manager-web/src/apis/module/user.js +++ b/main/manager-web/src/apis/module/user.js @@ -221,7 +221,7 @@ export default { }); }).send(); }, - // 智能体配置 + // 配置智能体 updateAgentConfig(agentId, configData, callback) { RequestService.sendRequest() .url(`${getServiceUrl()}/api/v1/user/agent/${agentId}`) @@ -231,8 +231,7 @@ export default { RequestService.clearRequestTime(); callback(res); }) - .fail((err) => { - console.error('保存配置失败:', err); + .fail(() => { RequestService.reAjaxFun(() => { this.updateAgentConfig(agentId, configData, callback); }); diff --git a/main/manager-web/src/views/roleConfig.vue b/main/manager-web/src/views/roleConfig.vue index e8fd0ade..adf8bedf 100644 --- a/main/manager-web/src/views/roleConfig.vue +++ b/main/manager-web/src/views/roleConfig.vue @@ -51,10 +51,10 @@
-
+
当前记忆(每次对话后重新生成)
-
+
清除
@@ -139,28 +139,28 @@ export default { methods: { saveConfig() { const configData = { - agentCode: this.form.agentCode, - agentName: this.form.agentName, - asrModelId: this.form.model.asrModelId, - vadModelId: this.form.model.vadModelId, - llmModelId: this.form.model.llmModelId, - ttsModelId: this.form.model.ttsModelId, - ttsVoiceId: this.form.ttsVoiceId, - memModelId: this.form.model.memModelId, - intentModelId: this.form.model.intentModelId, - systemPrompt: this.form.systemPrompt, - langCode: this.form.langCode, - language: this.form.language, - sort: this.form.sort + agentCode: this.form.agentCode, + agentName: this.form.agentName, + asrModelId: this.form.model.asrModelId, + vadModelId: this.form.model.vadModelId, + llmModelId: this.form.model.llmModelId, + ttsModelId: this.form.model.ttsModelId, + ttsVoiceId: this.form.ttsVoiceId, + memModelId: this.form.model.memModelId, + intentModelId: this.form.model.intentModelId, + systemPrompt: this.form.systemPrompt, + langCode: this.form.langCode, + language: this.form.language, + sort: this.form.sort }; import('@/apis/module/user').then(({ default: userApi }) => { - userApi.updateAgentConfig(this.$route.query.agentId, configData, ({data}) => { - if (data.code === 0) { - this.$message.success('配置保存成功'); - } else { - this.$message.error(data.msg || '配置保存失败'); - } - }); + userApi.updateAgentConfig(this.$route.query.agentId, configData, ({data}) => { + if (data.code === 0) { + this.$message.success('配置保存成功'); + } else { + this.$message.error(data.msg || '配置保存失败'); + } + }); }); }, resetConfig() {