Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Action can change your life!

Action can change your life!

Talk is beautifully crafted for beginners and intermediates who heard about Google Assistant but never explored before. This talk will provide you an extent level of journey how to start with it and for what purposes you can use Action on Google for your applications. Generate Simple Responses and Rich Responses with Basic card and Suggestion Chips.

I will discuss about following topics,

- What and Why Dialogflow
- About Entities, Intents, Integrations
- Creating Actions

Jaldeep Asodariya

October 07, 2018
Tweet

More Decks by Jaldeep Asodariya

Other Decks in Technology

Transcript

  1. Triggering Ok Google, talk to codelabs actions. Rajkot Hey Google,

    let me talk to codelabs actions. Ask codelabs actions to tell me brief about GDG.
  2. Rajkot How does it work? Actions on Google Dialogflow Firebase

    Realtime Database Firebase Cloud Functions
  3. Intent Matching - Match and categorize user utterances to an

    intent. Rajkot Entity Extraction - Identify key words and phrases spoken by the user. “ @
  4. Setup for Firebase Cloud Functions Install firebase command-line interface $

    npm -g install firebase-tools $firebase login $firebase init … $ npm install … $firebase deploy Rajkot
  5. const { dialogflow, Permission, Suggestions, } = require('actions-on-google'); const functions

    = require('firebase-functions'); const app = dialogflow({ debug: true }); app.intent('Default Welcome Intent', (conv) => { conv.ask(new Permission({ // Asks the user's permission to know their name context: 'Hi there, to get to know you better', permissions: 'NAME', })); }); ... exports.dialogflowWebhook = functions.https.onRequest(app);
  6. ... // Handle the Dialogflow intent named 'actions_intent_PERMISSION'. app.intent('actions_intent_PERMISSION', (conv,

    params, permissionGranted) => { const welcomeResponse = `Hi!, Welcome to Google Developers Groups. What you want to know about this platform?`; if (!permissionGranted) { // If the user denied our request, go ahead with the conversation. conv.ask(`OK, no worries. ` + welcomeResponse); conv.ask(new Suggestions('About GDG Ahmedabad', 'Brief about')); } else { // store their name in the 'conv.data' object conv.data.userName = conv.user.name.display; conv.ask(`Thanks, ${conv.data.userName}. ` + welcomeResponse); conv.ask(new Suggestions('About GDG Ahmedabad', 'Brief about')); } }); ...
  7. Personalize your responses with helper intents Helper intents return frequently-requested

    information such as the user's name and location actions_intent_PERMISSION
  8. Rajkot Jaldeep Asodariya, GDG Ahmedabad @jaldeepasodariy Thank you! Dank je!

    ध यवाद! ধন বাদ! ہﯾرﮑﺷ ﺎﮐ پآ! ﻲﻧﺎﺑرﮭﻣ ﻲﺟ نﺎھوﺗ! ကျေးဇူးတင်ပါတယ်! ന ി! ありがとうございました! Ευχαριστώ! Gràcies! ਤੁਹਾਡਾ ਧੰਨਵਾਦ! ಧನ ಾದ! À ringrazià ti! 谢谢! ந றி! ధన ా ల ! ¡Gracias! Faleminderit! આભાર! ขอขอบคุณ!