Anju Chowdary
Anju Chowdary

Reputation: 31

what is the difference between DialogflowApp and AssistantApp?

Can someone briefly tell me the difference between the DialogflowApp object and the ActionsSdkApp object in the node.js library for Actions on Google? When and where would we use them?

Upvotes: 2

Views: 1733

Answers (2)

Rahil B Rasheed
Rahil B Rasheed

Reputation: 129

Use the Actions SDK for one-shot apps. These are apps that provide the required answer directly after being invoked and then stop. They give you just this one result. A typical example would be setting a timer to ten minutes.

Use the Dialogflow for all other apps, for those that are really conversational, where there are multiple paths to follow and where you want your user to provide more information during the conversation.

Upvotes: 0

Prisoner
Prisoner

Reputation: 50741

The two are very similar, providing mostly equivalent interfaces for handling user input and sending back responses for apps/Actions written to work with the Google Assistant. The differences between the two address two different ways one can write these Actions.

  • DialogflowApp is the more commonly used of the two. It is used with the Dialogflow tool which helps you map user phrases to Intents and then calls your webhook. If you do not have your own Natural Language Processing (NLP) system, you will likely want to use an NLP such as Dialogflow.

  • ActionsSdkApp is used if you have a different NLP that you are integrating with Actions on Google. The Actions SDK provides more rudimentary handling, largely limiting you to built-in Intents and requiring you to do most of the language parsing yourself.

Both objects provide a JavaScript API that simplifies some of the complexities of the JSON object that your webhook receives when the user says something to your Action, and similarly simplifies generating the JSON response you're required to send back. It hides this JSON from you completely.

Upvotes: 3

Related Questions