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

# Smart Chat Features

> Use AI-powered features like Smart Replies, Conversation Starter, Conversation Summary, and Ask Bot using the CometChat JavaScript SDK.

<Accordion title="AI Integration Quick Reference">
  ```javascript theme={null}
  // Smart Replies
  const replies = await CometChat.getSmartReplies(receiverId, receiverType);

  // Conversation Starter
  const starters = await CometChat.getConversationStarter(receiverId, receiverType);

  // Conversation Summary
  const summary = await CometChat.getConversationSummary(receiverId, receiverType);

  // Ask Bot
  const answer = await CometChat.askBot(receiverId, receiverType, botUID, question);
  ```

  **Prerequisites:** AI features enabled in [CometChat Dashboard](https://app.cometchat.com)
</Accordion>

Smart Chat Features provide SDK methods for AI-powered capabilities that enhance user productivity — suggested replies, conversation openers, summaries, and bot interactions. These features require AI to be enabled in the [CometChat Dashboard](https://app.cometchat.com).

For dashboard configuration and UI Kit integration, see the [AI User Copilot overview](/fundamentals/ai-user-copilot/overview).

## Smart Replies

Get AI-generated reply suggestions for a conversation. Returns an object with positive, negative, and neutral suggestions.

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    CometChat.getSmartReplies(receiverId, receiverType).then(
      (replies: Object) => {
        console.log("Smart replies:", replies);
      },
      (error: CometChat.CometChatException) => {
        console.log("Error:", error);
      }
    );
    ```
  </Tab>

  <Tab title="JavaScript">
    ```javascript theme={null}
    CometChat.getSmartReplies(receiverId, receiverType).then(
      (replies) => {
        console.log("Smart replies:", replies);
      },
      (error) => {
        console.log("Error:", error);
      }
    );
    ```
  </Tab>
</Tabs>

| Parameter      | Type     | Description                                                       |
| -------------- | -------- | ----------------------------------------------------------------- |
| `receiverId`   | `string` | UID or GUID of the conversation                                   |
| `receiverType` | `string` | `CometChat.RECEIVER_TYPE.USER` or `CometChat.RECEIVER_TYPE.GROUP` |

## Conversation Starter

Get AI-generated opening lines for a new conversation. Returns an array of suggested messages.

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    CometChat.getConversationStarter(receiverId, receiverType).then(
      (starters: Array<string>) => {
        console.log("Conversation starters:", starters);
      },
      (error: CometChat.CometChatException) => {
        console.log("Error:", error);
      }
    );
    ```
  </Tab>

  <Tab title="JavaScript">
    ```javascript theme={null}
    CometChat.getConversationStarter(receiverId, receiverType).then(
      (starters) => {
        console.log("Conversation starters:", starters);
      },
      (error) => {
        console.log("Error:", error);
      }
    );
    ```
  </Tab>
</Tabs>

## Conversation Summary

Get an AI-generated summary of a conversation. Returns a string summarizing the conversation.

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    CometChat.getConversationSummary(receiverId, receiverType).then(
      (summary: string) => {
        console.log("Conversation summary:", summary);
      },
      (error: CometChat.CometChatException) => {
        console.log("Error:", error);
      }
    );
    ```
  </Tab>

  <Tab title="JavaScript">
    ```javascript theme={null}
    CometChat.getConversationSummary(receiverId, receiverType).then(
      (summary) => {
        console.log("Conversation summary:", summary);
      },
      (error) => {
        console.log("Error:", error);
      }
    );
    ```
  </Tab>
</Tabs>

## Ask Bot

Send a question to a specific AI bot and get a response.

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    CometChat.askBot(receiverId, receiverType, botUID, question).then(
      (answer: string) => {
        console.log("Bot response:", answer);
      },
      (error: CometChat.CometChatException) => {
        console.log("Error:", error);
      }
    );
    ```
  </Tab>

  <Tab title="JavaScript">
    ```javascript theme={null}
    CometChat.askBot(receiverId, receiverType, botUID, question).then(
      (answer) => {
        console.log("Bot response:", answer);
      },
      (error) => {
        console.log("Error:", error);
      }
    );
    ```
  </Tab>
</Tabs>

| Parameter      | Type     | Description                                                       |
| -------------- | -------- | ----------------------------------------------------------------- |
| `receiverId`   | `string` | UID or GUID of the conversation context                           |
| `receiverType` | `string` | `CometChat.RECEIVER_TYPE.USER` or `CometChat.RECEIVER_TYPE.GROUP` |
| `botUID`       | `string` | UID of the AI bot to query                                        |
| `question`     | `string` | The question to ask the bot                                       |

***

## Next Steps

<CardGroup cols={2}>
  <Card title="AI Agents" icon="robot" href="/sdk/javascript/ai-agents">
    Intelligent automated conversations with real-time streaming
  </Card>

  <Card title="AI Moderation" icon="shield-check" href="/sdk/javascript/ai-moderation">
    Automatically moderate messages with AI
  </Card>

  <Card title="Send Messages" icon="paper-plane" href="/sdk/javascript/send-message">
    Send text messages that trigger AI responses
  </Card>

  <Card title="Smart Chat Features Overview" icon="wand-magic-sparkles" href="/fundamentals/ai-user-copilot/overview">
    Dashboard configuration and UI Kit integration
  </Card>
</CardGroup>
