VictorRancesCode / flutter_dialogflow

Flutter package for makes it easy to integrate dialogflow and support dialogflow v2
Apache License 2.0
215 stars 73 forks source link

How to get suggestions in v2? #15

Open pablobarrera opened 5 years ago

pablobarrera commented 5 years ago

Hi, I have some doubts about how I should show suggested replies to the user.

I noticed in Dialogflow that some specific platforms like Google, Facebook, Slack, Skype have suggestion chips or quick replies, also I see that it's possible to add a custom payload with custom JSON. So, if I'm making a chatbot in my Flutter app, here are my questions:

thejitenpatel commented 4 years ago

@pablobarrera did you get a solution to these?

pablobarrera commented 4 years ago

I found a way, you can see it here: https://stackoverflow.com/questions/58341273/how-to-create-a-chatbot-with-response-options-in-flutter/58679095#answer-58679095

In the Dialogflow console you could add a custom payload to your messages, like this:

{"suggestions": ["Reply 1", "Reply 2"]}

thejitenpatel commented 4 years ago

@pablobarrera yeah actually I tried this code but shows me in the console and I'm not able to know should I embed that in widgets. So is there any way to do that as they have shown on StackOverflow?