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

## getPanelAgentBoundRole

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

> 💡 This API relies on cloud capabilities. Grant authorization in Development Settings - Cloud Capabilities on the [Mini App Developer Platform](https://platform.tuya.com/miniapp/).

### Description

Query the bound role.

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `params` | `GetPanelAgentBoundRoleParams` | Yes | Request body |

### Return Value

Type: `Promise<PanelAgentRoleDetail>`

GetPanelAgentBoundRoleResult (see type definitions and minituya response parameters for field meanings)

##### PanelAgentRoleDetail

| Property | Type | Description |
| --- | --- | --- |
| `roleId` | `string` | Role ID |
| `roleName` | `string` | Role name |
| `roleDesc` | `string` | Role description |
| `roleIntroduce` | `string` | Role introduction |
| `roleImgUrl` | `string` | Role image |
| `useLangCode` | `string` | Role language code |
| `useLangName` | `string` | Role language name |
| `useTimbreId` | `string` | Role voice |
| `isUserCloneTimbre` | `boolean` | Whether it is a custom cloned voice |
| `useTimbreName` | `string` | Role voice name |
| `useTimbreSupportLangs` | `string` | Voice languages supported by the role, separated by commas |
| `useTimbreSupportLangList` | `string[]` | List of voice languages supported by the role |
| `useTimbreTags` | `string[]` | Role tags |
| `useLlmId` | `string` | Role language model |
| `useLlmName` | `string` | Role language model name |
| `inBind` | `boolean` | Whether bound |
| `memoryInfo` | `string` | Memory |
| `speed` | `number` | Timbre speed |
| `tone` | `number` | Timbre tone |
| `templateId` | `string` | Template ID |
| `bindRoleType` | `number` | Bound role type |
| `lastTextAnswer` | `string` | Most recent reply text |
| `llmSupportFuncTags` | `string` | Function tags supported by the language model, separated by commas |

### Referenced Types

##### `interface` GetPanelAgentBoundRoleParams

| Property | Type | Description |
| --- | --- | --- |
| `devId` | `string` | Device ID |


### Examples

#### Request example

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

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

getPanelAgentBoundRole(params)
  .then(result => {
    console.log('Bound role information:', result);
  })
  .catch(error => {
    console.error('Failed to get bound role:', error);
  });
```

#### Response example

```json
{
  "roleId": "role_bound_001",
  "roleName": "Currently bound smart assistant",
  "roleDesc": "Bound smart assistant role",
  "roleIntroduce": "I am the currently bound smart assistant",
  "roleImgUrl": "https://example.com/bound_avatar.jpg",
  "useLangCode": "zh-CN",
  "useLangName": "Chinese (Simplified)",
  "useTimbreId": "timbre_bound_001",
  "isUserCloneTimbre": false,
  "useTimbreName": "Bound timbre",
  "useTimbreSupportLangs": "zh-CN,en-US",
  "useTimbreSupportLangList": ["zh-CN", "en-US"],
  "useTimbreTags": ["Friendly", "Professional"],
  "useLlmId": "1001",
  "useLlmName": "GPT-3.5-turbo",
  "inBind": true,
  "memoryInfo": "Memory info of bound role",
  "speed": 1.0,
  "tone": 0.8,
  "templateId": "template_001",
  "bindRoleType": 0,
  "lastTextAnswer": "Hello, I am your smart assistant",
  "llmSupportFuncTags": "text,voice,image"
}
```
