1

I am trying to make a bot through wit.ai. It is detecting the entity, but it is not calling the function which should be executed on detecting that entity.

For example, if you go to the link here on Witty Fiddle : https://wit-ai.github.io/witty-fiddle/?id=2a2aafd3e2656e7e74949331b85a6667

And say, hi. Bot detects its entity greeting and executes function replyToHi(). Then if user says Thank you, it will detect its entity as thankyou but instead of executing replyToThankyou(), it will just display Hi, how are you, without executing any function.

Whereas, when I call Tell me about good comedy movies, and it discovers intent as search_query and calls "findMovieBasedOnSearchItems()". And after that if I say thankyou, then it executes replyToThankyou() function.

What I am observing is that if it detects the another entity after the first one, it does not call bot executes functions, whereas after it detects some intent and then some entity, then it calls bot execute functions.

Please let me is there some bug in wit.ai or am I doing something wrong? Thank you.

Munahil
  • 2,381
  • 1
  • 14
  • 24

1 Answers1

1

Only trait entities influence function prediction. Instead of using keyword/free-text entities in your stories you should rather set them as trait entity. Also you can set some restrictions in Actions tab to prevent undesirable function callings.

A.N
  • 46
  • 4
  • So for this case, how can we use "trait" for "Greetings", "Thank you" and "Bye"? And also sometimes there execution function is called and other times it is not called. – Munahil Jan 03 '17 at 09:42
  • You have to remove keywor/free-text entities you set them. And then add entity say intent:greeting. If you add entity without selecting your message it will be automatically set as trait entity. In order to achieve better function prediction you will have to train it more with different type of phrases, sentence structures and etc. Also as I said use Actions tab to prevent wrong action calls. – A.N Jan 03 '17 at 20:06