getPanelAgentCustomRolePage(params: GetPanelAgentCustomRolePageParams)

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

描述

查询自定义角色列表(分页)。

参数

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

返回值

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

引用对象

typeGetPanelAgentCustomRolePageResult
CommonPageResult<PanelAgentCustomRoleListItem>

示例代码

请求示例

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

const params = {
  devId: 'your_device_id',
  pageNo: 1,
  pageSize: 10,
  roleCategory: 'assistant',
};

getPanelAgentCustomRolePage(params)
  .then(result => {
    console.log('自定义角色列表:', result);
  })
  .catch(error => {
    console.error('获取自定义角色列表失败:', error);
  });

返回示例

{
  "page": 1,
  "pageSize": 10,
  "totalPage": 1,
  "total": 1,
  "list": [
    {
      "roleId": "role_custom_001",
      "roleName": "智能助手小美",
      "roleDesc": "温柔贴心的智能助手",
      "roleIntroduce": "我是小美,您的专属智能助手",
      "roleImgUrl": "https://example.com/role_avatar.jpg",
      "useLangCode": "zh-CN",
      "useLangName": "中文(简体)",
      "useTimbreId": "timbre_001",
      "useTimbreName": "温柔女声",
      "useLlmId": "1001",
      "useLlmName": "GPT-3.5-turbo",
      "inBind": true,
      "templateId": "template_001",
      "inConversation": false,
      "lastTextAnswer": "您好,有什么可以帮助您的吗?"
    }
  ]
}