innFactory / react-native-dialogflow

A React-Native Bridge for the Google Dialogflow (API.AI) SDK
https://innfactory.de/softwareentwicklung/ui-ux/sprachsteuerung-mit-api-ai-in-einer-react-native-app/
MIT License
200 stars 64 forks source link

Response object changes. #49

Open ferdelamad opened 6 years ago

ferdelamad commented 6 years ago

Hi, my problem is that I always get the response of the default welcome intent and the next intent that I invoke. But if that intent that I invoke afterward has follow-up intents or has actions-parameters required dialog flow get lots in the conversation. I temporarily fix it for follow-up intents setting all the follow-up contexts in "Permanent contexts" (I don't know if this is the proper way of solving it), but it does not help for intents that have required actions and parameters for the user to continue the conversation.

The thing is that now dialog flow is following the conversation, but sometimes it gives me both fullfilmentText and richReponse (response from my back-end), but other times it only throws the normal fulfillment text from the dialog flow console.

Last thing, even if you start listening and stop listening like in the example that you have in the library, for every start/stop actions my back-end functions get triggered multiple times, I get between 15-20 triggers per click on start/stop. Any thoughts on that issue as well?

Also, everything works properly on the Google Assistant simulator.

Any suggestions on how to fix the response from dialog flow or on how I should implement the library in order to work properly with intents and the back-end?

Thanks!

gireeshbandlamudi commented 5 years ago

Dialogflow.startListening((result) =>{ console.warn("result called"); console.warn(result); }, (error)=>{ console.warn(error); });

In the above piece of code result callback is getting called multiple times. Facing the issue. Any progress on this issue