O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

Google Home and Google Assistant Workshop: Build your own serverless Action on Google app

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Carregando em…3
×

Confira estes a seguir

1 de 43 Anúncio

Google Home and Google Assistant Workshop: Build your own serverless Action on Google app

Baixar para ler offline

Want to build a custom app for Google Home or Google Assistant? Learn the basic concepts and how you can create a custom app to reach your users on new platforms (Google Home, Android, iPhone, and more) and help them get things done.

We'll use serverless tools like Google Cloud Functions as well as API.AI to do intelligent routing of commands to entities and intents.

Want to build a custom app for Google Home or Google Assistant? Learn the basic concepts and how you can create a custom app to reach your users on new platforms (Google Home, Android, iPhone, and more) and help them get things done.

We'll use serverless tools like Google Cloud Functions as well as API.AI to do intelligent routing of commands to entities and intents.

Anúncio
Anúncio

Mais Conteúdo rRelacionado

Diapositivos para si (20)

Quem viu também gostou (20)

Anúncio

Semelhante a Google Home and Google Assistant Workshop: Build your own serverless Action on Google app (20)

Anúncio

Mais recentes (20)

Google Home and Google Assistant Workshop: Build your own serverless Action on Google app

  1. 1. @bretmcg Building apps for Google Home and the Google Assistant And other chatbots too! Bret McGowen Developer Advocate, Google @bretmcg Workshop: bit.ly/home-workshop
  2. 2. @bretmcg The Google Assistant A conversation between you and Google that helps you get things done in your world
  3. 3. @bretmcg 100 million devices
  4. 4. @bretmcg
  5. 5. @bretmcg Connect with new users wherever the Google Assistant is available Actions on Google How you can extend the Google Assistant Help users get things done with your service Innovate with Conversational Interface
  6. 6. @bretmcg The next session about Kubernetes is “CI/CD for Node.js and Kubernetes in room Fisher West on Thursday at 3:20. Is there another topic you’re interested in? Sure! Here’s Node Summit Ok Google, let’s talk to Node Summit Enter Earcon Exit Earcon Hi, I’ll be your guide to Node Summit. I can help you explore topics or pick a session to attend. What would you like to know? When is the next Kubernetes talk?
  7. 7. @bretmcg Flow of an Action
  8. 8. @bretmcg Architecture ...
  9. 9. @bretmcg Create a project on the Actions Console https://console.actions.google.com/ - Configuration and Assistant Directory setup - Testing & Deployment - Analytics
  10. 10. @bretmcg Architecture Your app
  11. 11. @bretmcg Architecture
  12. 12. @bretmcg - Define Intents and Entities - Writing responses - Use Training to improve Actions Use API.AI (or other tools) to handle natural language ListSessions (session_tags.KUBERNETES); “What Kubernetes sessions are there?”
  13. 13. @bretmcg API.AI demo
  14. 14. @bretmcg Architecture Google Cloud
  15. 15. @bretmcg Cloud Functions A serverless environment to build and connect cloud services with code ● No managing servers ● Auto-scaling ● Pay only when invoked ● Node 6.11.1 ● Local ephemeral disk at /tmp ● Auto-authed to other Google Cloud services ● Auto-compilation of native addon modules
  16. 16. @bretmcg Architecture Google Cloud Functions
  17. 17. const App = require('actions-on-google').ApiAiApp; function listTopicsIntent(app) { ConferenceAPI.getCategories().then( categories => app.ask("The topics covered are: ${topics}." + "What do you want to learn?") ) } exports.myApp = function(request, response) { var app = new App({ request, response }); app.handleRequest(listTopicsIntent); }; Node.js app connected to API.AI npm install actions-on-google
  18. 18. @bretmcg Google Home app architecture Google Cloud Functions Your app's logicExtract entities and intents from text phrases Assistant answers user or routes to a custom Action { JSON } require('actions-on-google');
  19. 19. @bretmcg Cloud Functions demo
  20. 20. @bretmcg Response types
  21. 21. @bretmcg Simple response Supported surfaces: ● AUDIO_OUTPUT ● SCREEN_OUTPUT 640 character limit (300 recommended) Speech Synthesis Markup Language (SSML)
  22. 22. @bretmcg Card response Supported surface: SCREEN_OUTPUT Title and body Header image Link button
  23. 23. @bretmcg Supported surface: SCREEN_OUTPUT Used to pivot conversation Maximum 8 Narrow many choices to most popular Suggestion chips
  24. 24. @bretmcg Selector responses List selector SCREEN_OUTPUT Pagination Carousel selector SCREEN_OUTPUT Rich cards
  25. 25. @bretmcg Transactions
  26. 26. @bretmcg Seamless signup Top cause of abandoned carts: ● Forgotten Password ● Account Creation Pain Assistant enables seamless sign-in and account creation.
  27. 27. @bretmcg
  28. 28. Link to account Link FoodBot to your Google Account Jane Doe jane.doe@gmail.com Use another account Proposed order 1 1 Classic burger Add cheese Large fries $8.00 $0.50 $1.50 Pay with Google Visa ••••1234 Subtotal Tax Total $10.00 $0.75 $10.75 Confirmed 2 items • $10.75 Delivery 123 Castro St, Mountain View Confirm orderBuild basket Ask for address Jane Smith 1600 Amphitheater Rd Mountain View, CA 94043 Delivery address Jane Smith 12345 Castro St Mountain View, CA 94043 1 2 3 Payments Identity Receipts
  29. 29. @bretmcg Development workflow
  30. 30. @bretmcg Create a project on the Actions Console 2 Test In our web simulator or on device Enhance your app for mobile phones Integrate your app with our Transactions API Use API.AI (or other tools) to handle natural language Connect a webhook (we like Node.js) 1 3 4 5 6 Building our app
  31. 31. @bretmcg Fast feedback loop: Ngrok + Functions emulator Google Cloud Functions emulator Ngrok secure internet tunnels to localhost LIVE RELOADING DEBUG IN CHROME
  32. 32. @bretmcg Architecture in development ngrok
  33. 33. @bretmcg Discovering your app
  34. 34. @bretmcg How Users Discover your App In Dialogue 2 Assistant Directory Links that you share 1 3
  35. 35. In Dialogue Discovery: Explicit Triggering Ok Google, ask YodaBot to translate I'm from Texas Trigger Phrase App Name Developer Specified Action Preposition Action Phrase Developer Specified Partner Examples: Let’s speak to Domino’s At Akinator Ask Dr. Doggy if dogs can eat chocolate Ok Google, let’s talk to YodaBot Trigger Phrase App Name Developer Specified
  36. 36. @bretmcg Hey Google, I want to play a game.Hey Google, tell me a joke. In Dialogue Discovery: Implicit Triggering Hey Google, I want to work out. Hey Google, what’s the surf report
  37. 37. @bretmcg Discovery in the Google Assistant Directory
  38. 38. @bretmcg Link to your Assistant App From anywhere Share through social media. Promote through your own site or apps. Encourage press to drive traffic to your Assistant app.
  39. 39. @bretmcg Thank you! Resources Actions on Google ● developers.google.com/actions Designing your Actions ● g.co/dev/ActionsDesign Google Cloud Functions ● cloud.google.com/functions Bret McGowen Developer Advocate, Google @bretmcg Workshop: bit.ly/home-workshop

×