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

## updatePanelAgentChatSummary

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

> 💡 This API depends on cloud capabilities. In the Miniapp Developer Platform (https://platform.tuya.com/miniapp/), go to Development Settings > Cloud Capabilities to configure authorization.

### Description

Update role chat summary.

### Parameters

`Params`

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

### Return Value

Type: `Promise<boolean>`

UpdatePanelAgentChatSummaryResult (See type definitions and minituya return parameters for field meanings)

### Referenced Types

##### `interface` UpdatePanelAgentChatSummaryParams

| Property | Type | Description |
| --- | --- | --- |
| `devId` | `string` | Device ID |
| `bindRoleType` | `0 \| 1 \| 2` | 0 - custom agent role, 1 - agent role template, 2 - default role in a single-role scenario |
| `roleId` | `string` | Role ID (its meaning depends on bindRoleType) |
| `summaryItems` | `string[]` | Chat summary |


### Examples

#### Request example

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

const params = {
  devId: 'your_device_id',
  bindRoleType: 0,
  roleId: 'role_12345',
  summaryItems: ['The user asked about the weather', 'The agent provided an accurate weather forecast', 'The user was satisfied with the service'],
};

updatePanelAgentChatSummary(params)
  .then(result => {
    console.log('Update result:', result);
  })
  .catch(error => {
    console.error('Failed to update chat summary:', error);
  });
```

#### Response example

```json
true
```
