FIX_CHATBOT_SW&URL

This commit is contained in:
velz 2025-08-02 12:41:59 +05:30
parent f56b2afc8d
commit fd56103835
3 changed files with 6 additions and 5 deletions

View File

@ -111,7 +111,7 @@ class ChatbotControllerNew extends BaseController
log_message("error","Inside Bot Type Function");
$bot->types(); // Typing indicator for the first message
sleep(0.5); // Delay
sleep(0.1); // Delay
});
// Start the Main Menu when user says "hi" or "start"
$this->botman->hears('start|hi|hello|help|help me', function (BotMan $bot) {

View File

@ -28,7 +28,7 @@
// chatServer: 'https://venbait.in/nhance/chatbot/chat',
// frameEndpoint: 'https://venbait.in/nhance/chatbot/widget',
chatServer: `<?=base_url('chat')?>`,
frameEndpoint: `<?=base_url('widget')?>`,
frameEndpoint: `<?=base_url('widget')?>`,
title: "Ask ILA",
placeholderText: "Type your message here...",
aboutText: "Insurance Assistant ILA",

View File

@ -12,10 +12,11 @@ self.addEventListener('activate', function(event) {
// Fetch event
self.addEventListener('fetch', function(event) {
// console.log('Fetching:', event.request.url);
event.respondWith(
fetch(event.request).catch(function() {
return caches.match(event.request);
caches.match(event.request).then(function(response) {
// Respond with cached version or fetch from network
return response || fetch(event.request);
})
);
});