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

> JavaScript SDK implementation examples for AI-powered Smart Chat features including Conversation Starter, Smart Replies, and Conversation Summary

This page contains JavaScript SDK code examples for Smart Chat features. For feature documentation, setup instructions, and configuration options, see [Smart Chat Features](/fundamentals/smart-chat-features).

## How to Use AI Features with SDK

<Steps>
  <Step title="Enable in Dashboard">
    Login to [CometChat Dashboard](https://app.cometchat.com/login), select your app, then go to **Chat & Messaging → Features** and enable the AI feature.
  </Step>

  <Step title="Configure AI settings">
    Open the AI feature settings in the Dashboard to configure options like response style, language, etc.
  </Step>

  <Step title="Implement SDK methods">
    Use the code examples below to fetch AI-generated content.
  </Step>

  <Step title="Build your UI">
    Create UI components to display conversation starters, smart replies, and summaries.
  </Step>
</Steps>

***

## Conversation Starter

Retrieve AI-generated initial messages to start conversations.

### Get Conversation Starters

```js theme={null}
const receiverId = 'UID/GUID';
const receiverType = 'user/group';
const configuration = {lastNMessages: 100};

CometChat.getConversationStarter(receiverId, receiverType, configuration).then(
  (conversationStarter) => {
    console.log("Conversation Starter", conversationStarter);
  },
  (error) => {
    console.log("An error occurred while fetching conversation starter", error);
  }
);
```

***

## Smart Replies

Retrieve AI-generated reply suggestions based on conversation context.

### Get Smart Replies

```js theme={null}
const receiverId = "UID/GUID";
const receiverType = "user/group";
const configuration = { lastNMessages: 100 };

CometChat.getSmartReplies(receiverId, receiverType, configuration).then(
  (smartReplies) => {
    const { positive, negative, neutral } = smartReplies;
    console.log("Positive Reply", positive);
    console.log("Negative Reply", negative);
    console.log("Neutral Reply", neutral);
  },
  (error) => {
    console.log("An error occurred while fetching smart replies", error);
  }
);
```

***

## Conversation Summary

Retrieve AI-generated summaries of conversations.

### Get Conversation Summary

```js theme={null}
const receiverId = "UID/GUID";
const receiverType = "user/group";
const configuration = { lastNMessages: 100 };

CometChat.getConversationSummary(receiverId, receiverType, configuration).then(
  (conversationSummary) => {
    console.log("Conversation Summary:", conversationSummary);
  },
  (error) => {
    console.log("An error occurred while fetching conversation summary.", error);
  }
);
```
