actions-on-google

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

亡梦爱人 提交于 2019-11-28 21:42:55
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? 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 information sent to you on each invocation and tracking this in your fulfillment. Storing information you

Can I develop a private action only accessible via my google home or linked account?

拟墨画扇 提交于 2019-11-28 20:33:30
I have raspberry pi controlling my garage door and I want to be able to have an action to open or close it via google home / assistant. This action is custom and only specific to my needs and I'd like to be able to leverage google to interact with it, but I don't want to publish it for others since it is custom for me. Can this be done? I believe with Alexa it is possible and a quick browse through the docs nothing jumped out at me for this scenario. corefracture. Unfortunately private stand-alone actions that you can use just on your local devices are not implemented yet. Actions on Google

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

試著忘記壹切 提交于 2019-11-28 14:25:15
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 in New Delhi is 50 degree Celsius!`); // This works serviceRequest.getTemp("New Delhi", function(resp){

Error: No response has been set. Cloud Functions for Actions on Google Assistant

只愿长相守 提交于 2019-11-28 09:23:10
I am building an Assistant app for Google Home, using Dialogflow , Cloud Functions and the new NodeJS Client Library V2 for Actions on Google . In fact I am in the process of migrating my old code built with V1 to V2. The Context I am trying to get the user's location using two seperate intents: Request Permission (Intent that triggers/send permission request to the user) and User Info (Intent that checks if the user granted permission and then returns the data requested by the assistant to continue. The Issue The problem is that the same code that was working just fine on V1 isn't working on

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

Can I develop a private action only accessible via my google home or linked account?

醉酒当歌 提交于 2019-11-27 20:43:53
问题 I have raspberry pi controlling my garage door and I want to be able to have an action to open or close it via google home / assistant. This action is custom and only specific to my needs and I'd like to be able to leverage google to interact with it, but I don't want to publish it for others since it is custom for me. Can this be done? I believe with Alexa it is possible and a quick browse through the docs nothing jumped out at me for this scenario. 回答1: Unfortunately private stand-alone

Make google actions development project preview persist longer

最后都变了- 提交于 2019-11-27 17:38:06
I want to make google voice actions app for my Google Home. But, based on quick research, as of Dec 11, google does not allow private projects for Google Home. References: Can I develop a private action only accessible via my google home or linked account? How can I run my development action on my Google Home? I understand that I can preview the app from API.ai project, and it deployes to the linked Google Home device. But the issue is, the deployed app does not persist. It is no longer available after hour or so. How can I make it permanent (if there is a way) ? UPDATE Based on Leon's answer,

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