Spaces:
Runtime error
Runtime error
Update static/index.html
Browse files- static/index.html +11 -0
static/index.html
CHANGED
|
@@ -233,6 +233,17 @@
|
|
| 233 |
typingIndicator.remove();
|
| 234 |
}
|
| 235 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 236 |
</script>
|
| 237 |
</body>
|
| 238 |
</html>
|
|
|
|
| 233 |
typingIndicator.remove();
|
| 234 |
}
|
| 235 |
}
|
| 236 |
+
function initializeChat() {
|
| 237 |
+
const chatHistory = document.getElementById("chat-history");
|
| 238 |
+
chatHistory.innerHTML = ''; // Clear previous chat history
|
| 239 |
+
|
| 240 |
+
// Add the default bot message
|
| 241 |
+
const defaultMessage = "Hello! I'm FernAI. How can I assist you today?";
|
| 242 |
+
addMessage("Bot", defaultMessage, "bot-message");
|
| 243 |
+
|
| 244 |
+
// Scroll to the bottom
|
| 245 |
+
chatHistory.scrollTop = chatHistory.scrollHeight;
|
| 246 |
+
}
|
| 247 |
</script>
|
| 248 |
</body>
|
| 249 |
</html>
|