Skip to main content
Version: v4

Integration

By default, SmartReplies and ConversationStarter will be enabled if they are enabled from the dashboard as well.

To Enable Specific Feature

// entry file
import
{
AIEnabler,AISmartRepliesExtension,AISmartRepliesConfiguration
} from '@cometchat/chat-uikit-vue';
import {UIKitSettingsBuilder} from '@cometchat/uikit-shared';

const smartRepliesConfiguration = new AISmartRepliesConfiguration({});
const aiFeatures = [new AISmartRepliesExtension(smartRepliesConfiguration)]; //Add the features
const uiKitSettings = new UIKitSettingsBuilder()
.setAppId(appID)
.setRegion(region)
.setAuthKey(authKey)
.subscribePresenceForFriends()
.setAiFeatures(new AIEnabler(aiFeatures,new AIEnablerConfiguration({}))) //pass the features
.build();

To disable all features

// entry file
import {UIKitSettingsBuilder,AIEnabler} from '@cometchat/uikit-shared';

const uiKitSettings = new UIKitSettingsBuilder()
.setAppId(APPID)
.setRegion(REGION)
.setAuthKey(AUTHKEY)
.subscribePresenceForFriends()
.setAiFeatures(new AIEnabler([])) //pass an empty array to disable all the features.
.build();

Init CometChatUIKit

import {CometChatUIKit } from '@cometchat/chat-uikit-vue';

CometChatUIKit.init(uiKitSettings)?.then((response) => {
console.log('CometChatUIKit initialization completed successfully');
//load app
});