getPanelAgentRoleTemplateList(params: GetPanelAgentRoleTemplateListParams)

版本要求:
@tuya-miniapp/cloud-api≥1.0.6

描述

查询角色模板列表。

参数

参数类型必填说明
是请求体

返回值

类型:Promise<GetPanelAgentRoleTemplateListResult>
GetPanelAgentRoleTemplateListResult(字段含义见类型定义与 minituya 返回参数)

引用对象

typeGetPanelAgentRoleTemplateListResult
PanelAgentRoleTemplateListItem[]

示例代码

请求示例

import { getPanelAgentRoleTemplateList } from '@tuya-miniapp/cloud-api';

const params = {
  devId: 'your_device_id',
  tagCode: 'assistant',
};

getPanelAgentRoleTemplateList(params)
  .then(result => {
    console.log('角色模板列表:', result);
  })
  .catch(error => {
    console.error('获取角色模板列表失败:', error);
  });

返回示例

[
  {
    "templateId": "template_001",
    "roleId": "role_001",
    "roleName": "智能助手",
    "roleDesc": "专业的智能助手",
    "roleImgUrl": "https://example.com/role_avatar.jpg",
    "roleIntroduce": "我是您的专属智能助手",
    "useLangCode": "zh-CN",
    "useLangName": "中文(简体)",
    "useTimbreId": "timbre_001",
    "useTimbreName": "温柔女声",
    "useTimbreSupportLangs": "zh-CN,en-US",
    "useTimbreSupportLangNames": "中文(简体),English",
    "useLlmId": "1001",
    "useLlmName": "GPT-3.5-turbo",
    "inConversation": false,
    "lastTextAnswer": "",
    "bindStatus": false
  }
]