Last active
February 28, 2018 19:46
-
-
Save aylarov/6d8d0b093c58cf57408251ed947ede8f 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
const sessionId = () => Math.floor(100000 * Math.random()); | |
Net.httpRequest("https://api.dialogflow.com/v1/query?v=20170712&contexts=weather&query=" | |
+ encodeURI(userSpeech) | |
+ "&lang=en&sessionId=" | |
+ sessionId() | |
+ "&timezone=Europe/Moscow", (e) => { | |
// here we receive the JSON and continue our scenario execution | |
}, | |
{ headers: ["Authorization: bearer 1799227ce77f446fa8d64749f70527ca"]}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment