> For the complete documentation index, see [llms.txt](https://pycai.gitbook.io/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pycai.gitbook.io/welcome/api/chat2/delete_message.md).

# delete\_message

Delete a message

```python
async with client.connect('TOKEN') as chat2:
    await chat2.delete_message('CHAT_ID', ['TURN_IDS'])
```

### chat\_id <mark style="color:green;">\[str]</mark>

Unique ID for character history

### turn\_ids <mark style="color:green;">\[list]</mark>

List of message IDs that you want to delete, you can delete 1 message, but the line must be in the list

### token <mark style="color:green;">\[str]</mark> <mark style="color:purple;">(</mark>*<mark style="color:purple;">optional)</mark>*

You can set a specific token for the function, it will be executed from the specified token
