Skip to main content

Conversation Summary

Conversation Summary enables the summarization of conversations using AI.

Before you begin

  1. Set up the AI settings through the CometChat dashboard as detailed in the Overview section.
  2. Navigate to AI features and enable Conversation Summary.
Image
  1. Implement the chat functionality in your applications using CometChat's v4 Chat SDKs.

How does it work?

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

The CometChat SDK has a method to fetch the conversation summary. It returns the conversation summary as a string.

The number of messages to be fetched to generate relevant summaries is configurable. By default the CometChat AI takes the latest 1000 messages. This can be configured to specific timestamps as well.

ConfigurationValue
lastNMessagesThis will fetch specific number of messages.
fromTimestampThis will fetch messages from a particular timestamp.
toTimestampThis will fetch messages until a particular timestamp.
unreadOnlyThis will fetch only the unread messages.
info

While using any configuration mentioned above a maximum of only 1000 messages will be fetched.

Implementation

SDKs

To implement Conversation Summary in the platform of your choice, you may utilize the following code samples:

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);
}
);

UI Kits

Assuming the necessary pre-requisites are met, Conversation Summary functions seamlessly in the latest v4 Chat UI Kits. An AI icon should appear on the Message composer. Clicking on that icon should list Conversation Summary.