dialogflow

How to make http call on DialogFlow v2 using Javascript ajax call

不想你离开。 提交于 2019-12-29 08:01:37
问题 I found this example on the official site of DialogFlow using Node.js and it is working fine, but I dont know how do I integrate this into my web application. Is it possible that I can integrate this into my other javascript jquery code? and here I need to run node index.js but do I still need to do this if I integrate with my code? const projectId = 'xxx'; //https://dialogflow.com/docs/agents#settings const sessionId = 'xxxxx'; const query = 'Hello'; const languageCode = 'en-US'; //

dialogflow trigger event from webhook

淺唱寂寞╮ 提交于 2019-12-29 01:44:20
问题 I have an intent I1 with action x and an intent I2 which calls a webhook. Is there a way to trigger x from the I2 webhook response, in order to "redirect" the user to I1 after the webhook has given its answer? Is there a way to do so from the dialogflow console? Edit: added diagram for further clarification. What is the correct way to handle the "no" followup part? 回答1: Intents represent a user's input (typically what they say), not what you are "doing". Although you can redirect from a

How to extract the email Id and user name, which is linked with the google home , at the fullfilment of the google dialogflow flow

爷,独闯天下 提交于 2019-12-27 01:58:46
问题 I want to get the linked email id with google home , when user triggers an intent. I have followed the following link How to get user's unique identity from google home's voice match profile? I am following Rajat's answer and have done till the 2nd step. But I am not getting the accessToken in the user's object. I neeed this token to get the user details from this api endpoint: "https://www.googleapis.com/oauth2/v1/userinfo?access_token=" Instead I am getting this user object from the

Calling api.ai from Android

久未见 提交于 2019-12-25 16:44:54
问题 I am building an android app in which I am calling api.ai. I want to parse the response and display it to users. Earlier I had written code in node.js which is as below: function sendMessageToApiAi(options,botcontext) { var message = options.message; // Mandatory var sessionId = options.sessionId || ""; // optinal var callback = options.callback; if (!(callback && typeof callback == 'function')) { return botcontext.sendResponse("ERROR : type of options.callback should be function and its

Calling api.ai from Android

孤者浪人 提交于 2019-12-25 16:43:38
问题 I am building an android app in which I am calling api.ai. I want to parse the response and display it to users. Earlier I had written code in node.js which is as below: function sendMessageToApiAi(options,botcontext) { var message = options.message; // Mandatory var sessionId = options.sessionId || ""; // optinal var callback = options.callback; if (!(callback && typeof callback == 'function')) { return botcontext.sendResponse("ERROR : type of options.callback should be function and its

Dialogflow agents not visible in the console

…衆ロ難τιáo~ 提交于 2019-12-25 04:07:00
问题 I have two agents created in my account one for development and another one for production. All of a sudden I don't find them in the console It looks like I'm starting fresh. But the application is working fine. I'm able to make query to the BOT from my application and get back response. I raised to support tickets but have got no response from them. I'm unable to make any changes to my BOT now and completely stuck. What could have gone wrong? This is critical for me and one of the agents is

How to trigger multiple Intent in Webhook api.ai?

柔情痞子 提交于 2019-12-25 02:16:12
问题 I am developing an api.ai bot that will search for the Vendor name in the database. a ) if vendor exist -> provide username -> provide password b) if vendor doesn't exist -> (add vendor -> yes ) or (add vendor -> No) I have a webhook which is checking the vendor exist in database or not . Bot Scenario: (Example ) Case1: User: Do Alpha exist as a vendor? Bot: yes, Alpha exist in Database. Please Provide User Name. User: abc@gmail.com Bot: Please Provide Password? User: abcdef Bot : Welcome

How i can get user email,name while end user talking to Dialog flow ChatBot on Google Hangout

╄→尐↘猪︶ㄣ 提交于 2019-12-25 01:52:54
问题 Am going to integrate DialogFlow Bot with Hangout integration, I need the username and email whom my chatbot is communicating 回答1: You will need to set a a direct API from Hangout from there you can use Data.User to grab what you need You can see more here https://developers.google.com/resources/api-libraries/documentation/chat/v1/csharp/latest/classGoogle_1_1Apis_1_1HangoutsChat_1_1v1_1_1Data_1_1Message.html 回答2: I have the same requirement but I don't really understand the answer provided

Access token undefined

别等时光非礼了梦想. 提交于 2019-12-25 01:51:02
问题 i am new to google actions and dialogflow. Here i want to send notification to google assistant. But i am getting TypeError: Cannot read property 'access_token' of undefined const { google } = require('googleapis'); const key = require('./myapp.json'); let jwtClient = new google.auth.JWT( key.client_email, null, key.private_key, ['https://www.googleapis.com/auth/actions.fulfillment.conversation'], null ); jwtClient.authorize((err, tokens) => { let notif = { userNotification: { title: "message

DialogFlow: why does this Webhook Response fail with 'empty speech response'

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 01:48:49
问题 Why does this specific webhook response (passed by DialogFlow back to Google Assistant) { "fulfillmentMessages" : [ { "payload" : { "google" : { "richResponse" : { "items" : [ { "simpleResponse" : { "textToSpeech" : "And are you male or female?" } } ] }, "expectUserResponse" : true } }, "text" : { "text" : [ "And are you male or female?" ] } }, { "quickReplies" : { "quickReplies" : [ "Male", "Female" ] } } ], "fulfillmentText" : "And are you male or female?", "outputContexts" : [ ... ] }