# AI Chat

## Create AI Chat

First run the command: `/chat create`

<figure><img src="/files/NBHx2htyNIdrIS6JfDWr" alt=""><figcaption></figcaption></figure>

Here is an explanation of each arguments:

| Argument name  | Description                                                                                                                                                                                | Required           |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------ |
| pre-prompt     | The instructions you give your chatbot. Here you can describe its personality, its objective, the way it responds, etc.                                                                    | YES                |
| character-name | The name of the character that will be displayed in messages.                                                                                                                              | YES                |
| temperature    | AI temperature. Higher, more random and whimsical.                                                                                                                                         | YES                |
| memory-length  | The number of backward messages that AI must take into account. The higher the number, the more it will be able to take older messages into account, but the more credits it will consume. | YES                |
| icon           | URL redirecting to an image that will be displayed in messages.                                                                                                                            | NO                 |
| private        | Defines whether the thread should be private or not                                                                                                                                        | NO (default FALSE) |

### Success!

Congratulations, you've created your character in just a few moments and you can now interact with him or her.

<figure><img src="/files/sZ9P5oAsYFB2iDZ4sgaM" alt=""><figcaption></figcaption></figure>

### Let's try to talk

To take the example of The Rock to its logical conclusion, I'm going to have a chat with him.

<figure><img src="/files/zhFIlQyj9Mji3YreD2mQ" alt=""><figcaption></figcaption></figure>

As you can see, it remembers your previous messages as well as its own, because we've set the `memory-length` to 10, which means it remembers the last 10 messages.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.characterweaver.com/fundamentals/ai-chat.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
