mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-23 07:33:53 +08:00
feat: 新增角色标签配置
This commit is contained in:
@@ -398,4 +398,35 @@ export default {
|
||||
});
|
||||
}).send();
|
||||
},
|
||||
// 获取智能体标签
|
||||
getAgentTags(agentId, callback) {
|
||||
RequestService.sendRequest()
|
||||
.url(`${getServiceUrl()}/agent/${agentId}/tags`)
|
||||
.method('GET')
|
||||
.success((res) => {
|
||||
RequestService.clearRequestTime();
|
||||
callback(res);
|
||||
})
|
||||
.networkFail(() => {
|
||||
RequestService.reAjaxFun(() => {
|
||||
this.getAgentTags(agentId, callback);
|
||||
});
|
||||
}).send();
|
||||
},
|
||||
// 保存智能体标签
|
||||
saveAgentTags(agentId, tags, callback) {
|
||||
RequestService.sendRequest()
|
||||
.url(`${getServiceUrl()}/agent/${agentId}/tags`)
|
||||
.method('PUT')
|
||||
.data(tags)
|
||||
.success((res) => {
|
||||
RequestService.clearRequestTime();
|
||||
callback(res);
|
||||
})
|
||||
.networkFail(() => {
|
||||
RequestService.reAjaxFun(() => {
|
||||
this.saveAgentTags(agentId, tags, callback);
|
||||
});
|
||||
}).send();
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user