Before you begin
- Configure the AI settings through the CometChat dashboard as detailed in the Overview section.
-
Navigate to Chat > Features, under AI User Copilot, enable Smart Replies.
- 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 relevant replies. It returns three replies:positive, negative & neutral
.
The CometChat SDK has a method to fetch the smart replies in a conversation. It returns an object of three replies with keys: positive, negative & neutral
.
The number of messages to be fetched to generate relevant Smart Replies is configurable. By default the CometChat AI takes the latest 1000
messages. This can be configured to specific timestamps as well.
Configuration | Value |
---|---|
lastNMessages | This will fetch specific number of messages. |
fromTimestamp | This will fetch messages from a particular timestamp. |
toTimestamp | This will fetch messages until a particular timestamp. |
unreadOnly | This will fetch only the unread messages. |
While using any configuration mentioned above a maximum of only
1000
messages will be fetched.