Slot-based Questions
-
Why does "tomorrow at 4pm" have an intent of "movie" in the slot example recipe? If the user then types just "tomorrow at 4pm" at another point in the conversation, then wit.ai thinks the user is looking for a movie.
-
The API documentation for /converse says this:
q optional string A message from the user. This should only be set at the first step
and this: In the initial call, you would set q to the user message. In the following calls, you should leave it null (don’t set it).
How does this work for slot based stories then? I have a simple story, and it's modeled just like the slot example, here's the dialog when the user doesn't specify the class: User: What's my hw? Bot: In which class? User: In my math class Bot: {hw}
So how do I send up the second "In my math class" if not as a message?
Sorry for the confusion. You're right, "tomorrow at 4pm" should not have an intent. Some of our builtin entities have been greedy recently but we are working on cleaning them. On your second point, we will clarify this in the docs. But you have to call /converse recursively until you get a type=stop. This means you can start to listen to the new user messages. When the user sends another message (here "in my math class"), you start to call /converse recursively again. The first call of this recursion will have the user message q, not the other ones. Hope it helps
@l5t I'm calling /converse recursively but now I'm getting "stop" prematurely when using the API, however the same sequence works fine with the bot on the site. There must be something I'm missing?
Here's the conversation from the logs with the premature stop:

Here's the same conversation with the bot on the site (I add "missing_subject" with the first call to action, then remove it and add "class_grade" at the second call):

The relevant story:

The actions:

After the bot sends "for which class?" you should call /converse again with the context (the same in this case), and the bot should send stop, and then -- only then -- you can send a new user input "history".
It may seem weird, but we want to handle the case where the bot sends several messages in a row to the user.
Thanks for you quick response. I made the change as you suggested and it's working now just as it does with the bot. Awesome!
Seems this was closed a bit prematurely. Problem 1 in the OP still exists.
@ar7hur Hey Alex! When my bot sends multiple replies at once, it doesn't send "stop" afterwards, thus causing WitError: Max steps reached. Any idea why this happens? How is it determined in Wit.ai when "stop" should be sent? Here is the link to my app: https://wit.ai/jiajiazhang/Gooroo/logs/-1 The issue occurs after the "answerQuestions" action is executed. "Stop" is supposed to follow {askfdbk}.
Thanks a lot!