Reputation: 15136
In the DialogFlow console, you can set an input and output context for an intent.
I would like to have the same functionality using the Actions SDK. Since I can set the context in my fullfilment webhook in the code, the output SDK is covered. However, how do I set the input context for an intent to only trigger if that context was fetched?
I could not find this in the documentation examples.
Upvotes: 0
Views: 503
Reputation: 50701
I don't believe you can in the same way, which is part of why they added Dialogflow.
Although as part of your response you can indicate the ExpectedInput for the next Intent, the documentation for the ExpectedIntent makes it clear that your Intents are only used for speech biasing - you'll always get the built-in TEXT Intent.
In fact, this documentation says that you'll only get custom Intents for the initial call - later Intents are always triggered with a built-in one.
Update: One thing you can do is to include information in the response that will be sent back to you in the next request.
If you're using the JavaScript SDK, this is done with the second parameter to ask()
and is available via the getDialogState()
function.
If you're sending back JSON, this is done using the conversationToken
attribute and is available in conversation.conversationToken
in the request object you're sent the next round.
Upvotes: 1