Last active
August 12, 2018 12:01
-
-
Save garystafford/62385f86d32455946e16f1d5061e0a5c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// author: Gary A. Stafford | |
// site: https://programmaticponderings.com | |
// license: MIT License | |
'use strict'; | |
/* CONSTANTS */ | |
const { | |
dialogflow, | |
Suggestions, | |
BasicCard, | |
SimpleResponse, | |
Image, | |
} = require('actions-on-google'); | |
const functions = require('firebase-functions'); | |
const Datastore = require('@google-cloud/datastore'); | |
const datastore = new Datastore({}); | |
const app = dialogflow({debug: true}); | |
app.middleware(conv => { | |
conv.hasScreen = | |
conv.surface.capabilities.has('actions.capability.SCREEN_OUTPUT'); | |
conv.hasAudioPlayback = | |
conv.surface.capabilities.has('actions.capability.AUDIO_OUTPUT'); | |
}); | |
const IMAGE_BUCKET = process.env.IMAGE_BUCKET; | |
const SUGGESTION_1 = 'tell me a random fact'; | |
const SUGGESTION_2 = 'help'; | |
const SUGGESTION_3 = 'cancel'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment