froesmatheus / wit.net

C# library for Wit.ai https://wit.ai
MIT License
8 stars 5 forks source link

Subsequent messages from Wit.ai #1

Closed rolero closed 7 years ago

rolero commented 7 years ago

I have the challenge that I have subsequent messages coming from wit.ai. For example, the bot first says something back and then initiates a function with any user response in between. What is the best way to handle and receives these real-time messages using this library?

froesmatheus commented 7 years ago

Hi @rolero, can you please provide an example of this? I don't think I get it

rolero commented 7 years ago

For example:

  1. User says "hi"
  2. Bot says "Hi welcome"
  3. Bot calls function

I am not getting the second message from the bot because there is no user interaction in between.

issue

rolero commented 7 years ago

Hi, any update?

froesmatheus commented 7 years ago

Hi @rolero, sorry for my long response delay, I was not receiving notifications about this thread. What I don't understand about your example is that you're executing an action after a bot response, but you're not using the context keys that is the result of the action. I think you should do something like this:

capturar

froesmatheus commented 7 years ago

@rolero, after seeing your challenge, I realized that the current SDK is not able to handle multiple messages coming from the bot at the same time. This happens because the bot response is only returning a string containing the response. One of the possible solutions would be, instead of returning only one value, it returns a list of responses, but that would break current solutions. I will try to implement this feature as soon as possible. Thanks!

froesmatheus commented 7 years ago

Hi @rolero , I updated the nuget package with the recent changes. Make sure you're using the 'RunActions' method. Please give me feedback about the new version, thanks!

froesmatheus commented 7 years ago

Hi @rolero, any news?