---
name: "getPanelAgentBoundRole"
mode: "kit"
versionRequirements:
  - { name: "@tuya-miniapp/cloud-api", version: "1.0.6" }
---

## getPanelAgentBoundRole

> [VERSION] @tuya-miniapp/cloud-api >= 1.0.6

> 💡 接口依赖云能力，需在 [小程序开发者平台](https://platform.tuya.com/miniapp/)开发设置 - 云能力 进行授权配置。

### 描述

查询绑定的角色。

### 参数

`Params`

| 参数 | 类型 | 必填 | 默认值 | 描述 |
| --- | --- | --- | --- | --- |
| `params` | `GetPanelAgentBoundRoleParams` | 是 | - | 请求体 |

### 引用对象

##### `interface` GetPanelAgentBoundRoleParams

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `devId` | `string` | 设备ID |


### 示例代码

#### 请求示例

```typescript
import { getPanelAgentBoundRole } from '@tuya-miniapp/cloud-api';

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

getPanelAgentBoundRole(params)
  .then(result => {
    console.log('绑定的角色信息:', result);
  })
  .catch(error => {
    console.error('获取绑定角色失败:', error);
  });
```

#### 返回示例

```json
{
  "roleId": "role_bound_001",
  "roleName": "当前绑定的智能助手",
  "roleDesc": "已绑定的智能助手角色",
  "roleIntroduce": "我是当前绑定的智能助手",
  "roleImgUrl": "https://example.com/bound_avatar.jpg",
  "useLangCode": "zh-CN",
  "useLangName": "中文（简体）",
  "useTimbreId": "timbre_bound_001",
  "isUserCloneTimbre": false,
  "useTimbreName": "绑定音色",
  "useTimbreSupportLangs": "zh-CN,en-US",
  "useTimbreSupportLangList": ["zh-CN", "en-US"],
  "useTimbreTags": ["友好", "专业"],
  "useLlmId": "1001",
  "useLlmName": "GPT-3.5-turbo",
  "inBind": true,
  "memoryInfo": "绑定角色的记忆信息",
  "speed": 1.0,
  "tone": 0.8,
  "templateId": "template_001",
  "bindRoleType": 0,
  "lastTextAnswer": "您好，我是您的智能助手",
  "llmSupportFuncTags": "text,voice,image"
}
```
