Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a message type to access in the library #9

Closed
SmiffyKMc opened this issue Apr 20, 2021 · 6 comments
Closed

Creating a message type to access in the library #9

SmiffyKMc opened this issue Apr 20, 2021 · 6 comments

Comments

@SmiffyKMc
Copy link

I see you have your message types, and can also see you have the card showing in the example. But when using Dialogflow to create responses, what does the library Message components expect to see to set its Message type? For instance, using the Default response, you are given two options, Text and Payload. Action on Google has many more options, but the library doesn't seem to work well with it, not being able to read its response type.

What Dialogflow response's should we use to allow for the library to extract the message type. Do you have an example?

@KieranMccarthyVersion1
Copy link

@ElZombieIsra Was wondering if you could assist here? Just what to create in the response on Dialogflow that will allow the library to render those cards, carousels etc?

@ElZombieIsra
Copy link
Member

Hey guys.
So, this line it's what's determines the Message type for the intent.
We're checking several props that the API from DialogFlow sends to the library.
As for the Card, check the example code in this line and this widget

What I'm doing in the DialogFlow console inside the intent is adding a custom response pressing this icon

Captura de pantalla 2021-04-23 a las 8 09 51 p m

Then pressing "Facebook"

Captura de pantalla 2021-04-23 a las 8 10 19 p m

Then inside the "Facebook" tab, pressing "Add Responses"

Captura de pantalla 2021-04-23 a las 8 11 00 p m

After that, you select "Card"

Captura de pantalla 2021-04-23 a las 8 11 39 p m

And fill the inputs as you wish

Captura de pantalla 2021-04-23 a las 8 15 41 p m

Hope that helps. Let me know if we can close this issue and if you need anything else

@SmiffyKMc
Copy link
Author

That's very helpful! We originally tried Google Assistant as there were more responses to return. Was there a reason why ye didn't look at Google Assistant for response types?

@SmiffyKMc
Copy link
Author

Nevermind, thanks for your help, it's working as expected :)

@bashiryousufy
Copy link

Can you also give us a demo for suggestion chip from google assistance?

@reconftw010101
Copy link

@bashiryousufy Have you figure out for google assistance ??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants