import { updatePanelAgentCustomRole } from '@tuya-miniapp/cloud-api';
const params = {
devId: 'your_device_id',
roleId: 'role_custom_12345',
roleName: '智能助手小美v2',
roleDesc: '更加温柔贴心的智能助手',
roleIntroduce: '我是小美,您的专属智能助手,现在更加贴心了!',
roleVariables: {
personality: 'very_friendly',
expertise: 'advanced',
},
roleImgUrl: 'https://example.com/new_avatar.jpg',
useLangCode: 'zh-CN',
useTimbreId: 'timbre_002',
useLlmId: '1002',
memoryInfo: '用户喜欢详细的解答',
speed: '0.9',
tone: '0.7',
needBind: 'true',
};
updatePanelAgentCustomRole(params)
.then(result => {
console.log('更新结果:', result);
})
.catch(error => {
console.error('更新自定义角色失败:', error);
});