BealinkChatbot.init({
// API ConfigurationbaseUrl: '',
vectorStore: 'lxp', // 'lxp' or 'lms'// Widget Settingsposition: 'bottom-right', // 'bottom-right' or 'bottom-left'bottomOffset: 20, // Distance from bottom of screen in pixelsrightOffset: 20, // Distance from right/left edge in pixelstitle: 'DocuBot Assistant',
welcomeMessage: 'Hello! How can I help you today?',
placeholderText: 'Type your message...',
// History SettingsenableHistory: true,
historyKey: 'bealink_chatbot_history',
maxHistoryMessages: 50,
// Theme Customizationtheme: {
primaryColor: '#0078d4',
secondaryColor: '#f3f2f1',
textColor: '#323130',
fontFamily: 'Segoe UI, sans-serif',
fontSize: '14px',
borderRadius: '12px',
widgetWidth: '380px',
widgetHeight: '550px'
},
// Accessibilityaccessibility: {
announceMessages: true,
highContrastMode: false
}
});
Live Demo Controls
Customize Theme
API Methods
// Open the chat widget
BealinkChatbot.open();
// Close the chat widget
BealinkChatbot.close();
// Send a message programmatically
BealinkChatbot.send('How do I create a course?');
// Clear chat history
BealinkChatbot.clearHistory();
// Update configuration on the fly
BealinkChatbot.updateConfig({
vectorStore: 'lms',
theme: { primaryColor: '#e74c3c' }
});
// Destroy the widget completely
BealinkChatbot.destroy();