# Chat

Chats is a chat with your configured AI models inside WordPress. Open it from
**Chats** below AI in the sidebar, or with **New chat** on AI's start screen.
It needs at least one [API key](/docs/ai/settings/api-keys.md); until one is
stored, the message field reads "Add an AI provider key to start…".

## Conversations

Every chat is saved as you write and belongs to you: other users do not see
your chats. Sending the first message of a new chat gives it a short title,
written by the model, and adds it to the sidebar, where a search field filters
your chats.

The toolbar above an open chat has these actions:

- **New Chat** starts an empty chat.
- **Rename** changes the chat's title.
- **Duplicate** copies the whole chat into a new one titled "Copy: " and the
  original title.
- **Delete** removes the chat and its messages.

## Choosing a model

The model selector in the message field lists the models of every provider
with a stored key and your [custom models](/docs/ai/settings/custom-models.md),
with a search field. A new chat starts with the default model chosen under
**Settings > Chat**, or with the first model listed when none is chosen; an
existing chat continues with the model it last used.

## Working with replies

A finished reply offers these actions:

- **New chat from here** copies the chat up to that reply into a new chat, so
  you can take the conversation another way and keep the original.
- **Regenerate** removes the reply and everything after it and asks the model
  again.
- **Delete from here** removes the reply and everything after it. The first
  reply of a chat does not offer it.

You can stop a reply while it is being written. A reply that failed or was
stopped offers **Retry**.

## Images from the media library

The attach button in the message field opens the WordPress media library,
where you can choose one or more images. They are attached to your next
message and sent to the model with it, so use a model that accepts images.

## Sharing

The share button in the message field opens **Share chat**. **Share now**
uploads the chat as it is to SleekWP's share service and adds a link to the
list; each link opens the shared chat read-only on this site's AI screen.
**Delete share** removes a shared copy. Sharing needs an active
[license](/docs/ai/activating.md), and a share is a copy: messages you add later
are not part of it until you share again.

## Chats from earlier versions

Chats saved by an earlier SleekAI version are converted the first time Chats
opens. A chat that cannot be converted is named in a notice and stays in the
database untouched.

## Keeping chats for a limited time

SleekAI keeps chats until you delete them. To delete old chats automatically,
set the number of days to keep them:

```bash
wp sleek ai settings update retention.days 90
```

Every day after that, chats last updated longer ago are deleted with their
messages. The same rule applies to Agent conversations and chatbot logs, which
are stored alongside. The `sleekAi/retention/days` filter can set the period
in code; see the [hooks reference](/docs/ai/reference/hooks.md).
