🔧 Configuración del ChatBot
const chat = new ChatBot({
baseUrl: 'https://hubdocs.test',
apiKey: 'Ac7bdb20-ecdc-453f-bdca-40e90880d424',
tenant: 'nomed',
user: {
name: '', // Nombre vacío para forzar registro
email: 'usuario@example.com',
photo: "https://res.cloudinary.com/dhqqkf4hy/image/upload/v1754206933/user_icon_wbwkja.png"
},
bot: {
name: 'Boti',
img: "../src/img/bot_icon.png"
},
options: {
show: true,
stream: true,
cache: true, // ✅ Habilitar caché
register: true, // ✅ Habilitar registro
testMode: false, // ✅ Usar API real
},
custom: {
primaryColor: "#007bff",
botName: "Asistente Virtual",
headerBgColor: "#007bff",
headerTextColor: "#fff",
sendButtonText: "Enviar",
chatWidth: "500px",
chatHeight: "70vh",
chatMaxWidth: "90vw",
chatMaxHeight: "80vh",
fullscreenEnabled: true,
messagesHeight: "350px",
buttonSize: "56px",
showTime: true,
sound: true,
reminderTimeout: 10000,
maxQuestionLength: 50,
position: {
bottom: "24px",
right: "24px"
}
}
});