The conversation started Callback

When I run the action:

OK Google Talk My Assistant

It authenticates and runs a greeting intent, which loads custom objects that can be used for subsequent API questions.

When I try to run an action:

Ok google ask my assistant some question

It authenticates, but I am unable to load user objects because I do not have a session ID for the conversation.

When the API.AI tries to evaluate a question, it cannot because the user objects were not loaded.

It seems the only option is SlotFilling WebHook ... but I really don't need it (or its complexity) if I have the ability to define Entities users.

Any way to get the API.AI session identifier (which is determined by Google actions) before the first API.AI request? Or is there any other way to get a WebHook call that contains sessionID before the API.AI is trying to evaluate some kind of question?

+4
source share
2 answers

Well, I found a solution. I have placed an input context named "EntitiesLoaded" to all of my deep links. Then when I issue:

OK Google will ask my assistant some question

He calls "Falling the target." In backup intent, I do the following:

  • Loading custom objects
  • Set the "EntitiesLoaded" context.
  • Reissue the original request (which was passed to the Fallback value). This time it will work.
+1

, . , , API.AI ( ).

Ok Google talk to <invocation_name> about ... <deep_link_phrase>

, , .

, , .

0

Source: https://habr.com/ru/post/1674847/


All Articles