Download processors/logicHandler/fallback.js from phanquocdat123/Chatbot_Robot_Automation: direct link, hf CLI and curl.
- Browser
- Download file 714 Bytes
-
https://huggingface.co/spaces/phanquocdat123/Chatbot_Robot_Automation/resolve/main/processors/logicHandler/fallback.js
- Command line
-
hf download hf://spaces/phanquocdat123/Chatbot_Robot_Automation/processors/logicHandler/fallback.js
-
curl -L -o fallback.js https://huggingface.co/spaces/phanquocdat123/Chatbot_Robot_Automation/resolve/main/processors/logicHandler/fallback.js
714 Bytes
| const googleSheets = require('../../services/googleSheets'); | |
| const fallbackHandler = { | |
| process: async (message) => { | |
| try { | |
| // Tìm câu trả lời tương ứng trong Excel Giao Tiếp | |
| const extraReply = await googleSheets.getChatResponse(message); | |
| // Nếu tìm thấy thì trả về, không thì dùng câu chào mặc định | |
| return extraReply || "Dạ shop Hương Kid nghe đây ạ! Mẹ cần em tư vấn mẫu chi cho bé rứa Mẹ ơi?"; | |
| } catch (e) { | |
| return "Dạ Mẹ nhắn chi em chưa rõ lắm, Mẹ nói rõ hơn để em hỗ trợ mình nhen!"; | |
| } | |
| } | |
| }; | |
| module.exports = fallbackHandler; |