> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-platform-docs-release.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Smart Chat Features

> AI-powered features that help conversations start faster, stay on track, and wrap up clearly

CometChat AI helps conversations start faster, stay on track, and wrap up clearly with smart suggestions and summaries.

<Note>
  **Out-of-the-box in:** [UI Kit Builder](/chat-builder/react/features) ✅ | [Widget Builder](/widget/html/features) ✅ | [UI Kits](/ui-kit/react/core-features) ✅ | [SDK](/sdk/javascript/overview) ✅
</Note>

<Warning>
  Smart Chat Features use OpenAI's API. You'll be billed by OpenAI based on your usage. Monitor your OpenAI dashboard for cost tracking.
</Warning>

## Prerequisites

<Steps>
  <Step title="Open your CometChat app">
    Login to your [CometChat dashboard](https://app.cometchat.com/login) and choose your app.
  </Step>

  <Step title="Open AI settings">
    Navigate to **AI Chatbot** → **Settings** in the left-hand menu.
  </Step>
</Steps>

## Configure AI

<Steps>
  <Step title="Set the GPT model">
    Enter the OpenAI ChatGPT model name you intend to use (e.g., `gpt-4`, `gpt-3.5-turbo`).
  </Step>

  <Step title="Save the OpenAI key">
    Generate an API key from your [OpenAI account](https://platform.openai.com/account/api-keys) and save it here.
  </Step>

  <Step title="Set a custom instruction">
    Add app-level context to guide how CometChat AI responds. Example: "You are a helpful customer support assistant for an e-commerce platform."
  </Step>

  <Step title="Set the temperature">
    Choose a value based on the desired balance between consistency and creativity.
  </Step>

  <Step title="Enable AI">
    Toggle AI on to activate these features.
  </Step>
</Steps>

### Temperature Guidelines

| Temperature | Behavior                         | Best for                             |
| ----------- | -------------------------------- | ------------------------------------ |
| 0.0 - 0.3   | Highly consistent, deterministic | Customer support, factual responses  |
| 0.4 - 0.6   | Balanced                         | General conversation, most use cases |
| 0.7 - 1.0   | Creative, varied                 | Creative writing, brainstorming      |

<Note>
  Start with 0.3-0.5 for most business applications. Increase if responses feel too repetitive.
</Note>

***

## Conversation Starter

Conversation Starter enables you to retrieve an initial message in a new conversation, often used to set the context for the conversation that is about to begin.

**When to use:** Empty chat screens, onboarding new users, or helping users break the ice in new conversations.

<Note>**SDK Implementation:** [JavaScript](/sdk/javascript/extensions/smart-chat-features#conversation-starter) ✅ | [React Native](/sdk/react-native/extensions/smart-chat-features#conversation-starter) ✅ | [Android](/sdk/android/extensions/smart-chat-features#conversation-starter) ✅ | [iOS](/sdk/ios/extensions/smart-chat-features#conversation-starter) ✅ | [Flutter](/sdk/flutter/extensions/smart-chat-features#conversation-starter) ✅</Note>

### Before you begin

<Steps>
  <Step title="Enable Conversation Starter">
    Go to **Chat** → **Features**, under **AI User Copilot**, enable **Conversation Starter**.
  </Step>

  <Step title="Use v4 Chat SDKs">
    Implement chat using [CometChat v4 Chat SDKs](/sdk/javascript/overview).
  </Step>
</Steps>

### How does it work?

CometChat AI analyzes the user's tone and writing style by reviewing recent messages sent by that user within the application.

The SDK includes a method for retrieving conversation starters in a chat. This method returns an array containing three potential starters for the conversation.

Configuration options:

* **lastNMessages**: Fetch a specific number of recent messages.
* **fromTimestamp**: Fetch messages from a particular timestamp.
* **toTimestamp**: Fetch messages up to a particular timestamp.

<Note>
  A maximum of **only** `1000` messages will be fetched regardless of configuration.
</Note>

### UI Kits

Conversation Starter functions seamlessly starting from v4 of the Chat UI Kits. It is triggered automatically when there are no messages in a conversation.

***

## Smart Replies

Smart Replies enable the retrieval of an AI-generated response message within a conversation. Helps users respond quickly with contextually appropriate messages.

**When to use:** Busy support agents, users who want quick responses, or reducing typing effort on mobile.

<Note>**SDK Implementation:** [JavaScript](/sdk/javascript/extensions/smart-chat-features#smart-replies) ✅ | [React Native](/sdk/react-native/extensions/smart-chat-features#smart-replies) ✅ | [Android](/sdk/android/extensions/smart-chat-features#smart-replies) ✅ | [iOS](/sdk/ios/extensions/smart-chat-features#smart-replies) ✅ | [Flutter](/sdk/flutter/extensions/smart-chat-features#smart-replies) ✅</Note>

### Before you begin

<Steps>
  <Step title="Enable Smart Replies">
    Go to **Chat** → **Features**, under **AI User Copilot**, enable **Smart Replies**.
  </Step>

  <Step title="Use v4 Chat SDKs">
    Implement chat using [CometChat v4 Chat SDKs](/sdk/javascript/overview).
  </Step>
</Steps>

### How does it work?

CometChat AI goes through the messages of a conversation to understand the context & provide relevant replies. It returns three replies: `positive, negative & neutral`.

Configuration options:

* **lastNMessages**: Fetch a specific number of recent messages.
* **fromTimestamp**: Fetch messages from a particular timestamp.
* **toTimestamp**: Fetch messages up to a particular timestamp.
* **unreadOnly**: Fetch only unread messages.

<Note>
  A maximum of **only** `1000` messages will be fetched regardless of configuration.
</Note>

### UI Kits

Smart Replies function seamlessly starting from v4 of the Chat UI Kits. In v4, Smart Replies are accessible manually, whereas in v5, they work automatically.

***

## Conversation Summary

Conversation Summary enables the summarization of conversations using AI. Get quick overviews of long conversations without reading every message.

**When to use:** Catching up on missed conversations, handoffs between support agents, or reviewing discussion outcomes.

<Note>**SDK Implementation:** [JavaScript](/sdk/javascript/extensions/smart-chat-features#conversation-summary) ✅ | [React Native](/sdk/react-native/extensions/smart-chat-features#conversation-summary) ✅ | [Android](/sdk/android/extensions/smart-chat-features#conversation-summary) ✅ | [iOS](/sdk/ios/extensions/smart-chat-features#conversation-summary) ✅ | [Flutter](/sdk/flutter/extensions/smart-chat-features#conversation-summary) ✅</Note>

### Before you begin

<Steps>
  <Step title="Enable Conversation Summary">
    Go to **Chat** → **Features**, under **AI User Copilot**, enable **Conversation Summary**.
  </Step>

  <Step title="Use v4 Chat SDKs">
    Implement chat using [CometChat v4 Chat SDKs](/sdk/javascript/overview).
  </Step>
</Steps>

### How does it work?

CometChat AI goes through the messages of a conversation to understand the context & provide a short summary of the conversation.

The SDK method returns the conversation summary as a string.

Configuration options:

* **lastNMessages**: Fetch a specific number of recent messages.
* **fromTimestamp**: Fetch messages from a particular timestamp.
* **toTimestamp**: Fetch messages up to a particular timestamp.
* **unreadOnly**: Fetch only unread messages.

<Note>
  A maximum of **only** `1000` messages will be fetched regardless of configuration.
</Note>

### UI Kits

Conversation Summary functions seamlessly starting from v4 of the Chat UI Kits. The placement of the AI icon may vary based on the version. Clicking on the icon will display the Conversation Summary.
