How to retain chat history when you leave at the page #2391
mtanco
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This code is an H2O Wave application that creates a simple web interface with two interactive tabs: a chatbot and a static welcome page. The app showcases how to retain chat history within a session and switch between two views using tab navigation.
Key Components:
Chatbot Functionality: The application stores and displays a chat conversation between the user and a bot.
Tab Navigation: The app provides a simple UI with two tabs—"Chat" and "Other." The "Chat" tab displays the chatbot interface, while the "Other" tab shows a welcome message.
Session Management: The application retains chat history using session variables (
q.client.chatbot_history), ensuring that the conversation persists as the user interacts with the app.Dynamic Page Rendering: It dynamically clears and updates UI components (referred to as "cards") based on user interaction, ensuring that only relevant content is displayed at any given time.
This code is a demo of how to maintain state, build interactive components, and manage dynamic user interfaces using the H2O Wave framework.
Beta Was this translation helpful? Give feedback.
All reactions