actions-on-google / actions-on-google-java

Java/Kotlin library for Actions on Google
Apache License 2.0
286 stars 39 forks source link

How to enrich messages with content? #57

Open muliyul opened 3 years ago

muliyul commented 3 years ago

I have a Dropwizard application configured. The endpoint is configured as follows:

image

My app: image

I want to create personalized experience for the authenticated user but I cannot pass the user to the @ForIntent method for obvious reasons.

In order to solve this I'm required to create an instance per request/user however that feels like bad practice.

How do I use this library with my use case?

Fleker commented 3 years ago

How are you getting the user? Can you grab the user data from account linking in the intent handler and then use that to generate a personalized response?

muliyul commented 3 years ago

How are you getting the user? Can you grab the user data from account linking in the intent handler and then use that to generate a personalized response?

I'm saving the session of the user in a database, fetching it when a webhook arrives. I'm using Dialogflow, not Google actions.

I've also noticed Events are missing from the API and this is a deal breaker for me.

taycaldwell commented 3 years ago

This library is for webhook development for the Google Assistant Dialogflow integration. If you are not integrating with Google Assistant, this library will not be useful.

For more information regarding Dialogflow development tooling, please visit the Dialogflow documentation.

muliyul commented 3 years ago

The Java/Kotlin library makes it easy to create Actions for the Google Assistant and supports Dialogflow and Actions SDK fulfillment.

Somewhat misleading don't you think?