dialogflow

How can I request the user's location in API.ai?

六眼飞鱼酱① 提交于 2019-12-23 03:29:33
问题 I'm creating an agent using api.ai and using a PHP script as a webhook. The documentation doesn't make it clear on how to do it, but I'm wanting to request permission to the user's coarse location so they won't have to provide their location for requests. I've tried echo-ing the JSON they mention, and putting it in as a custom payload for the default welcome intent, but neither of those seem to prompt me for permission to use my location. How do I ask a user for permission to get their

DIalogflow Telephony integration is interpreting SSML response from webhook as normal text

送分小仙女□ 提交于 2019-12-23 03:03:25
问题 I am using dialogflow-fulfillment nodejs library to send response(eg: agent.add("<speak>hello</speak>") ) back to the dialogflow agent. It works fine with dialogflow agent and google simulator. However, when I use the same response with telephony integration. It does not recognize it as "ssml" and speak it as "greater than speak less than....hello less than slash ..greater than>. Also. I checked SDK supported platforms and it looks like version 0.6.1 does not support telephony Platform yet.

DIalogflow Telephony integration is interpreting SSML response from webhook as normal text

眉间皱痕 提交于 2019-12-23 03:03:14
问题 I am using dialogflow-fulfillment nodejs library to send response(eg: agent.add("<speak>hello</speak>") ) back to the dialogflow agent. It works fine with dialogflow agent and google simulator. However, when I use the same response with telephony integration. It does not recognize it as "ssml" and speak it as "greater than speak less than....hello less than slash ..greater than>. Also. I checked SDK supported platforms and it looks like version 0.6.1 does not support telephony Platform yet.

dialogflow-fulfillment-library and express, what to res on?

走远了吗. 提交于 2019-12-23 03:02:58
问题 I'm trying to use the dialog-fulfillment-library with express, without firebase functions. I'm having trouble finding how to res on the agent though. const { WebhookClient, Card, Suggestion } = require('dialogflow-fulfillment'); module.exports = function () { let self = {}; self.create = function (req, res, next) { const agent = new WebhookClient({request: req, response: res}); agent.add(new Suggestion(`Quick Reply`)); agent.add(new Card({ title: `Title: this is a card title`, imageUrl:

Record audio using Google Actions

℡╲_俬逩灬. 提交于 2019-12-23 02:45:09
问题 We are looking to build Google Action where it will record small snippets (like a voice TODO list) and can be played later. Is there any documentation for this? 回答1: In short - no. Google does not provide access to the audio stream from the Assistant. You can get the Speech To Text (STT) processed by Google, however, using the Actions on Google API. 来源: https://stackoverflow.com/questions/52104621/record-audio-using-google-actions

Dialogflow V2 API - How to pass context and/or payload [PHP]

醉酒当歌 提交于 2019-12-23 01:44:13
问题 I am trying to send context and payload to the Dialogflow V2 API. I am able to successfully send a queryString and get a response from my agent. However, I need to pass context and payload parameters with this query and I cannot seem to find ANY help on this for PHP. Please see my code below. I am able to create the context object and the payload object (atleast I think its created), but how do I pass it to the API? Any help would be appreciated as I am very new to dialogflow and have been

How do I set context and followup event in one intent?

早过忘川 提交于 2019-12-23 00:52:27
问题 I am trying to jump to a random question with followup event, and at the same time store the question number in the context. But dialogflow only jumps to the event without storing the question number. Is there a way to do followup event and store a context in one intent? app.intent('Quiz - random', (conv) => { let rand = Math.floor(Math.random() * quiz_len) + 1; conv.data.current_qns = rand; conv.followup(`quiz-question${rand}`); }); 回答1: Not really. The point of using conv.followup() is to

Error: No handler for requested intent at WebhookClient.handleRequest

 ̄綄美尐妖づ 提交于 2019-12-22 18:10:15
问题 Default intent calling a cloud function gives error Error: No handler for requested intent at WebhookClient.handleRequest (/user_code/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:287:29) at exports.dialogflowFirebaseFulfillment.functions.https.onRequest (/user_code/index.js:73:11) at cloudFunction (/user_code/node_modules/firebase-functions/lib/providers/https.js:57:9) at /var/tmp/worker/worker.js:783:7 at /var/tmp/worker/worker.js:766:11 at _combinedTickCallback

Detect request coming from google home using dialogflow

↘锁芯ラ 提交于 2019-12-22 12:39:05
问题 How to detect the request coming to dialogflow from google home devices. For google assistant,Facebook and all, I used the source parameter from the originalRequest node. {"originalRequest":{"source":"google","data":{"sender":{"id":"3"},"recipient":{"id":"3"},"message":{"mid":"mid","text":"apple iphone 8","seq":3},"timestamp":1522229806857}} But for google home also I am getting the source parameter as google itself. So Is there any parameter to detect the request coming from google home, so

When to use user entities in Dialog Flow?

折月煮酒 提交于 2019-12-22 10:51:15
问题 In Where is the data context in Dialog Flow (API.ai) I asked how to keep user-specific data. For example, the user asks for a list of cities and the webhook service randomly picks three. If you then want to refer later to a city in this list, you somehow need to store it. The answer in the issue was that it could be transferred back and forth in the context. Now I read about user entities in the documentation. This was an unknown concept to me. My question is now: could we also use user