> 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/rate.md).

# rate

Rate the character's last message

```python
await client.chat2.rate(NUM, 'CHAT_ID', 'TURN_ID', 'CANDIDATE_ID')
```

### rate <mark style="color:green;">\[int]</mark>

A number meaning stars. 0 - Terrible, 1 - Bad, 2 - Good, 3 - Fantastic

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

Unique ID for character history

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

Last message UUID

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

You can find it at character response

### 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
