dialogflow

Why is the carousel not showing in the console simulator?

﹥>﹥吖頭↗ 提交于 2019-11-28 05:12:46
问题 I am trying to figure out how I can embed Google Actions responses, such as the carousel, in a webhook response for DialogFlow. I am using V2 of the REST protocol, so I am filling ACTIONS_ON_GOOGLE in the source field and the payload field contains the Google Actions field as specified (as per How can I integrate the Google Actions responses in a webhook response in Dialogflow?). I am sending the following response: { "fulfillmentText":"This is a carousel.", "source":"ACTIONS_ON_GOOGLE",

Use Async Functions in DialogFlow WebHook

随声附和 提交于 2019-11-28 00:16:44
Referring to the solution posted here ( DialogFlow V2 Webhook - Expects Speech responses Immediately and not after async requests ) What I want to achieve is that the web hook should wait until I get a response from my api call. P.S: The API is working, its just that the bot doesn't wait for the response to come. Any help would be greatly appreciated. Thanks const rp = require('request-promise'); function convert(params){ return rp('https://data.fixer.io/api/convert?access_key=[my key]&from='+ params['currency-from']+'&to='+params['currency-to']+'&amount='+params.amount) .then((data) => { let

DialogFlow V2 Webhook - Expects Speech responses Immediately and not after async requests

北城余情 提交于 2019-11-27 21:55:05
问题 I have a DialogFlow V2 node.js webhook. I have an intent that is called with a webhook action: const { WebhookClient } = require('dialogflow-fulfillment'); const app = new WebhookClient({request: req, response: res}); function exampleIntent(app) { app.add("Speak This Out on Google Home!"); // this speaks out fine. no error. } Now, if I have an async request which finishes successfully, and I do app.add in the success block like this: function exampleIntent(app) { myClient.someAsyncCall

Using 3rd party API within Dialogflow Fulfillment

谁都会走 提交于 2019-11-27 16:43:30
问题 I've got a Dialogflow agent for which I'm using the Inline Editor (powered by Cloud Functions for Firebase). When I try to embed an HTTPS GET handler within the Intent handler, it crashes with log entry "Ignoring exception from a finished function". Maybe there's a better way to do this with promises but I'm new to that. I can see that it does in fact execute the external query after upgrading to the Blaze plan so it's not a limitation of the billing account. Anyhow, here's the code: 'use

Get email from user using Google actions

时间秒杀一切 提交于 2019-11-27 15:21:42
问题 I want to recieve the user email using Google Actions as documented here but docs talks about EMAIL permission, but when I read the permission docs here I can't find any EMAIL permission. Any help? How can I receive the user email? 回答1: Ya, unfortunately the Assistant's SDK doesn't give you the email address. But if you implement account linking (like Ahmed mentioned) and use the Streamlined Flows, then you'll be getting the email provided to you; you just need to use the jsonwebtoken library

Dialogflow easy way for authorization

爷,独闯天下 提交于 2019-11-27 09:42:23
Does there exist an easy way to connect my Dialogflow agent to my node.js code? When I use this code with the correct projectID taken from the Dialogflow agent's settings page, I have the following error: Error: Unexpected error while acquiring application default credentials: Could not load the default credentials. Browse to https://developers.google.com/accounts/docs/application-default-credentials for more information. const sessionClient = new dialogflow.SessionsClient(); const sessionPath = sessionClient.sessionPath(projectId, sessionId); I visited the page, but for what I want I think is

Dialogflow NodeJs Fulfillment V2 - webhook method call ends before completing callback

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 08:48:08
问题 I am developing a Dialogflow webhook using dialogflow-fulfillment-nodejs client to find temperature for a city. While using the services to fetch the temperature for a city, everything works and the correct response is also generated but the response is not sent to the user even when the right method is called. Here is the issue in the Dialogflow GitHub repo Code function getTemp(agent) { const timeStart = new Date().getTime(); console.info(`temp function called`); // agent.add(`Temperature

Google App Engine: from six.moves import http_client no module named moves

主宰稳场 提交于 2019-11-27 08:27:30
问题 Okie dokie, I'm trying to get Google's Dialogflow python API working with Google App Engine, and I seem to be running into issues when I run the application. I have pip installed dialogflow to a lib folder and added the lib folder through the app.yaml file. I keep running into an error where it says that it can't find 'six.moves.' Very new to this (app engine in general), so please tell me if I have something setup wrong. I've read a few other threads with no luck. This won't work locally or

How do I save and retrieve information across invocations of my agent in Dialogflow?

雨燕双飞 提交于 2019-11-27 02:02:48
问题 I would like my Actions on Google agent to store and retrieve certain pieces of information across invocations - like a cookie. How do I do this? 回答1: You have a lot of options on how you want to do this, depending on exactly what you're trying to do. It isn't exactly like a web cookie, although there are similarities. If you want the equivalent of a session cookie, information that is retained during a single conversation , then your options are Using the Session ID provided as part of the

Send parameters to webhook on dialogflow sdk v2

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 01:36:06
问题 I'm trying to send some parameters to dialogflow (api.ai) such as username, email, etc but I couldn't figure it out. The problem is I cannot get/set any specific data (such as username, email, etc.) with Dialogflow v2 Nodejs SDK. I tried to use queryParams.payload (v1: originalRequest ) but It didn't work somehow. Also, I tried to trigger custom event with data but I couldn't get any event data on the response. Does someone know how to send some specific data for session talk on dialogFlow?