GoogleCloudPlatform / dialogflow-integrations

Dialogflow integrations with multiple platforms including KIK, Skype, Spark, Twlio, Twitter and Viber
https://cloud.google.com/dialogflow/
Apache License 2.0
246 stars 499 forks source link

[FR] Officially allow facebook persona in dialogflow (or at least mention in document about facebook persona) #205

Open Thaina opened 1 year ago

Thaina commented 1 year ago

Is your feature request related to a problem? Please describe. There is a facebook feature that we could replace page responder with name and image of generated avatar, which is called personas feature. I have experiment with dialogflow and it seem I could hack the page's access token to append &persona_id={pid} and dialogflow will just use all that string to call facebook API

This seem a bit hacky and I cannot be sure there would be nothing changed in the future so I would like to propose that dialogflow should put some effort for this feature

Describe the solution you'd like There are 2 possibility I could think of 1 - Have specific persona ID input field that we could put a persona ID for the page 2 - instead of page access token, please just allow us to put arbitrary http url at that place. Maybe have toggle on/off for allow putting accesstoken but can switch to raw url. If we could put any url to listen to dialogflow response, not only we can put facebook URL with any query string we wanted to, we can also create our own proxy server to listen to dialogflow response and manage the message response to facebook by ourselves

Describe alternatives you've considered I also would like to request that dialogflow should opensource the facebook conversion package or client object that dialogflow server was used internally, so we can call detectIntent and then convert fulfillmentMessages into proper facebook responses ourselves

There are many problem I felt dialogflow-facebook integration should be improved. But it would be fine if I could just create proxy server by myself (at least in firebase). But the fulfillmentMessages from dialogflow are not in the form that easy to convert to facebook. It should also provide library I could use for this case if possible

Another possibility is, the detectIntent API should allow us to specified built in platform as its parameter. And so the response fulfillment message could come back in the similar structure as the dialogflow server will push to facebook messenger