Skip to main content
// Smart Replies
CometChat.getSmartReplies("UID", CometChatConstants.RECEIVER_TYPE_USER,
    object : CometChat.CallbackListener<HashMap<String, String>>() {
        override fun onSuccess(replies: HashMap<String, String>) { }
        override fun onError(e: CometChatException) { }
    })

// Conversation Starter
CometChat.getConversationStarter("UID", CometChatConstants.RECEIVER_TYPE_USER,
    object : CometChat.CallbackListener<List<String>>() {
        override fun onSuccess(starters: List<String>) { }
        override fun onError(e: CometChatException) { }
    })

// Conversation Summary
CometChat.getConversationSummary("UID", CometChatConstants.RECEIVER_TYPE_USER,
    object : CometChat.CallbackListener<String>() {
        override fun onSuccess(summary: String) { }
        override fun onError(e: CometChatException) { }
    })
Requires: AI features enabled in CometChat Dashboard
AI User Copilot provides AI-powered assistance to users during conversations. For a broader introduction and Dashboard configuration, see the AI User Copilot Overview.

Smart Replies

Use getSmartReplies() to get AI-suggested replies for the current conversation context.
val receiverId = "UID"
val receiverType = CometChatConstants.RECEIVER_TYPE_USER

CometChat.getSmartReplies(receiverId, receiverType,
    object : CometChat.CallbackListener<HashMap<String, String>>() {
        override fun onSuccess(replies: HashMap<String, String>) {
            Log.d(TAG, "Smart replies: $replies")
            // Display reply suggestions to the user
        }

        override fun onError(e: CometChatException) {
            Log.e(TAG, "Error: ${e.message}")
        }
    })
ParameterDescription
receiverIdUID of the user or GUID of the group
receiverTypeCometChatConstants.RECEIVER_TYPE_USER or RECEIVER_TYPE_GROUP
Returns a HashMap<String, String> of suggested reply options.

Conversation Starter

Use getConversationStarter() to get AI-suggested opening messages for a new conversation.
val receiverId = "UID"
val receiverType = CometChatConstants.RECEIVER_TYPE_USER

CometChat.getConversationStarter(receiverId, receiverType,
    object : CometChat.CallbackListener<List<String>>() {
        override fun onSuccess(starters: List<String>) {
            Log.d(TAG, "Conversation starters: $starters")
            // Display starter suggestions to the user
        }

        override fun onError(e: CometChatException) {
            Log.e(TAG, "Error: ${e.message}")
        }
    })
ParameterDescription
receiverIdUID of the user or GUID of the group
receiverTypeCometChatConstants.RECEIVER_TYPE_USER or RECEIVER_TYPE_GROUP
Returns a List<String> of suggested conversation openers.

Conversation Summary

Use getConversationSummary() to get an AI-generated summary of the conversation history.
val receiverId = "UID"
val receiverType = CometChatConstants.RECEIVER_TYPE_USER

CometChat.getConversationSummary(receiverId, receiverType,
    object : CometChat.CallbackListener<String>() {
        override fun onSuccess(summary: String) {
            Log.d(TAG, "Summary: $summary")
            // Display summary to the user
        }

        override fun onError(e: CometChatException) {
            Log.e(TAG, "Error: ${e.message}")
        }
    })
ParameterDescription
receiverIdUID of the user or GUID of the group
receiverTypeCometChatConstants.RECEIVER_TYPE_USER or RECEIVER_TYPE_GROUP
Returns a String containing the AI-generated conversation summary.

Next Steps

AI Agents

Integrate AI-powered agents for automated interactions

AI Moderation

Automatically review messages for inappropriate content

AI User Copilot Overview

Configure AI Copilot features in the Dashboard

Send Messages

Send messages in conversations