Comments (7)
suggested flow:
database store: userID, menuTag
Store userID for each user
menu = {a,b,c,..}
menuTag defines the which menu option the user picked
go to the corresponding branch to handle the event according to the tag.
from com.comp3111.chatbot.
Actually, a local variable can be used in the controller to indicate the operation jump between functions.
So database call is not required every time a user decides to change function.
Give the exit keyword to abort any logical steps in any operations.
from com.comp3111.chatbot.
@IniZio @hlmaab
I think the we only need to store the latest action and input in the database?
the current design of the main flow keep all input.
Ud332c012b25d536d03194a8d0845567a | d | people_input
Ud332c012b25d536d03194a8d0845567a | d | people_input
Ud332c012b25d536d03194a8d0845567a | d | people_input
Ud332c012b25d536d03194a8d0845567a | d | people_input
Ud332c012b25d536d03194a8d0845567a | d | people_search
Ud332c012b25d536d03194a8d0845567a | kcc | exit_to_main
Ud332c012b25d536d03194a8d0845567a | e | room_input
Ud332c012b25d536d03194a8d0845567a | e | room_search
Ud332c012b25d536d03194a8d0845567a | 1232 | exit_to_main
Ud332c012b25d536d03194a8d0845567a | sdf | exit_to_main
Ud332c012b25d536d03194a8d0845567a | b | openinghour_choose
Ud332c012b25d536d03194a8d0845567a | b | openinghour_search
Ud332c012b25d536d03194a8d0845567a | 2 | exit_to_main
Ud332c012b25d536d03194a8d0845567a | d | people_input
Ud332c012b25d536d03194a8d0845567a | d | people_search
Ud332c012b25d536d03194a8d0845567a | kccho | exit_to_main
Ud332c012b25d536d03194a8d0845567a | e | room_input
Ud332c012b25d536d03194a8d0845567a | e | room_search
Ud332c012b25d536d03194a8d0845567a | 1234 | exit_to_main
Ud332c012b25d536d03194a8d0845567a | f | room_input
Ud332c012b25d536d03194a8d0845567a | f | room_search
from com.comp3111.chatbot.
The userid should make as candidate key to make sure it is unique and search the userid each time to load the latest input for that user.
from com.comp3111.chatbot.
That means if the user inputs again (not the first time), we should find the userid and update userinput and action instead of just inserting them?
from com.comp3111.chatbot.
yes, so we dont need to loop through all the entry. we can just use select * where userid=id to get the user input. I am working on it now.
from com.comp3111.chatbot.
Doesnt matter now 😏
from com.comp3111.chatbot.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from com.comp3111.chatbot.