wit icon indicating copy to clipboard operation
wit copied to clipboard

Is there a way to detect if a user question has already previously been asked by the user?

Open agrey opened this issue 9 years ago • 1 comments

Question: is there a way to detect if a user question has already previously been asked by the user?

For example, let's say the user asks Question A. Then Question B. Then Question C. Then Question A again. Is there a way to create a variable that increments when a particular question is asked, so that a different response, or a modified response, can be given the second time?

agrey avatar Apr 10 '17 16:04 agrey

Hi @agrey,

Here's a suggestion: after user asks a specific question, you can detect it with a trait entity (e.g. intent), create a story with first action being e.g. rememberQuestion and the second one e.g. answerQuestion. In the implementation of rememberQuestion, look at the value of the trait entity and save it (e.g. in a map). answerQuestion would look at the map to pick the next question to ask.

Hope this helps.

patapizza avatar Apr 10 '17 22:04 patapizza