wit.ai - unrecognised user entries

孤人 提交于 2019-12-22 14:48:55

问题


is it possible to have a catch-all for unrecognized user entries to move the user into a particular story?

For example in a conversation. If there are no matching stories the bot will respond to try and push the user back on track?

[user] Hi how are you

[bot] good, how are you?

[user] great

[bot] that is good

--- user enters an un-matched sentence ---

[bot] I did not understand you. Would you like to order a pizza?

[user] yes

...etc


回答1:


I don't know if it's the best solution but I do the following:

1) Create a story without intent to catch the "no matching stories".

2) The bot answers: "I did not understand you. Would you like to order a pizza?"

3) Yes/No handling https://wit.ai/docs/recipes#handle-yesno-answers

4) If yes, create an action call "jumpToPizzaOrderingStory". On your side, this action "emulates" the fact that the users sent "I want to order a pizza" that will triggered your PizzaOrdering story.



来源:https://stackoverflow.com/questions/40331967/wit-ai-unrecognised-user-entries

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!