Created
November 29, 2017 17:59
-
-
Save frogermcs/016169ca9bd522381ebf2b0de626a5f9 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
//assistant-actions.js | |
module.exports = { | |
//... | |
ACTION_FACTS_DRINKING_WATER: 'facts_drinking_water' | |
}; | |
//index.js | |
exports.waterLog = functions.https.onRequest((request, response) => { | |
//... | |
//Define map of Dialogflow agent Intents | |
let actionMap = new Map(); | |
//... | |
actionMap.set(Actions.ACTION_FACTS_DRINKING_WATER, () => conversation.getFactForDrinkingWater()); | |
//Handle request from Dialogflow (will be dispatched into appropriate action defined above) | |
dialogflowApp.handleRequest(actionMap); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment