mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-25 00:23:53 +08:00
feat: 新增智能体标签、上下文源功能
This commit is contained in:
@@ -183,3 +183,26 @@ export function createVoicePrint(data: { agentId: string, audioId: string, sourc
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
// 获取智能体标签
|
||||
export function getAgentTags(agentId: string) {
|
||||
return http.Get<any[]>(`/agent/${agentId}/tags`, {
|
||||
meta: {
|
||||
ignoreAuth: false,
|
||||
toast: false,
|
||||
},
|
||||
cacheFor: {
|
||||
expire: 0,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
// 更新智能体标签
|
||||
export function updateAgentTags(agentId: string, data) {
|
||||
return http.Put(`/agent/${agentId}/tags`, data, {
|
||||
meta: {
|
||||
ignoreAuth: false,
|
||||
isExposeError: true,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ export interface Agent {
|
||||
summaryMemory: string | null
|
||||
lastConnectedAt: string | null
|
||||
deviceCount: number
|
||||
tags: { id: string, tagName: string }[]
|
||||
}
|
||||
|
||||
// 智能体创建数据类型
|
||||
|
||||
Reference in New Issue
Block a user