dialogflow

Dialogflow: Respond based on values and other conditional responses

不打扰是莪最后的温柔 提交于 2019-12-01 03:27:28
问题 I have $dinetype variable obtained from the user. But I would like to give response based on what value has been set in $dinetype variable. In addition to giving responses, I also need to set relevant context. How do I do this in DialogFlow? if($Dinetype=='dineout') ask ('which restaurant would you like to go to?') set_context ('awaiting-restaurant') if($Dinetype=='takeaway') ask ('When would you like to take away?') set_context ('awaiting-takeaway-time') Is it programmable at all? Or is it

Force user to relink his/her account

ε祈祈猫儿з 提交于 2019-11-30 22:42:49
Very simple use case explaining my problem: Given my app asks for a pin for some interactions. Now the user gives me three times a wrong pin. Then, I want to reset his access and force him to re-link his account. I can do this pretty easily in my internal database, but I need a way to tell google that his currently used token is not valid anymore. Else, Google Assistant resists in sending me the now rejected token. Update 2018-03-01 : With the new built-in intents/events, I also tried sending the actions_intent_SIGN_IN event via the followupEvent attribute, but this only lead google assistant

Null response for name and email entities

吃可爱长大的小学妹 提交于 2019-11-30 22:14:47
I tried inbuilt variable "user" methods, $user.name and $user.email in text response of API.AI, to greet user and show email-Id. Is there any inbuilt variable name user? Example(User sign-up with Gmail), Response-Code, I had tried in API.AI's text-response dialog box: Hi, $user.firstname This is your $user.email Expected: User: Hi! My-Assistant-App: Hi, Varun. User: Show my email-id My-Assistant-App: This is your ******@gmail.com Output, I am getting in the My-Assistant-App: User: Hi! My-Assistant-app: Hi, $user.firstname User: Show my email-id My-Assistant-App: This is your $user.email Since

How to get user's unique identity from google home's voice match profile?

时光怂恿深爱的人放手 提交于 2019-11-30 19:46:35
问题 I want to develop an application(action) on Google Home, which will return some confidential information to user. So, I can't authenticate the user based on account linking as that device can be used by any person in the room. How can I get user's unique identity(may be email id) from voice match profile? 回答1: Account Linking is tied to the specific user that says "Ok Google" or "Hey Google" to invoke your Action. If the user that says it does not have a registered voice on the device they

Device location in dialogflow (api.ai) webhook request

白昼怎懂夜的黑 提交于 2019-11-30 16:05:50
I'm working on a Dialogflow chat bot for Google Assistant, in the webhook request JSON example here: https://developers.google.com/actions/reference/v1/dialogflow-webhook the webhook receives device data including its location: "device": { "location": { "coordinates": { "latitude": 123.456, "longitude": -123.456 }, "formatted_address": "1234 Random Road, Anytown, CA 12345, United States", "zip_code": "12345", "city": "Anytown" } } For some reason my webhook is not receiving any device data (the "device" key is missing completely). Does anyone know what I'm doing wrong or how I can include this

Device location in dialogflow (api.ai) webhook request

和自甴很熟 提交于 2019-11-30 15:53:14
问题 I'm working on a Dialogflow chat bot for Google Assistant, in the webhook request JSON example here: https://developers.google.com/actions/reference/v1/dialogflow-webhook the webhook receives device data including its location: "device": { "location": { "coordinates": { "latitude": 123.456, "longitude": -123.456 }, "formatted_address": "1234 Random Road, Anytown, CA 12345, United States", "zip_code": "12345", "city": "Anytown" } } For some reason my webhook is not receiving any device data

Is there a way to have change female to male voice during the conversation in DialogFlow (Api.ai)

六眼飞鱼酱① 提交于 2019-11-30 07:36:30
问题 We a building a chatbot app for Google Home using Api.ai (Dialogflow now) which has both male and female historical figures. We are using Actions on google. Google lets you default to a male or female voice when deploying the app. Is there a way to switch between male to female voice dynamically, for example, using code in webhook? 回答1: Maybe . Although SSML supports a <voice> tag, the documentation for Actions does not list it as supported. However, as you noted, there appears to be some

How to get exact answers instead of the whole document using Watson Discovery?

一笑奈何 提交于 2019-11-30 05:24:19
After testing the discovery service , it seems useless to me at least or I might be missing something. When I query, it matches the document and returns the whole document . If my document is huge, then for all queries it returns the whole document matching the query text, which is useless. Now Do I have to create a separate document for every query? If that's the case, API.AI or WIT.AI is a better option. Please clear me on what I am missing in here! For now with Discovery, you would need to break up your documents once to put them in a collection, then any query against the collection in

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

感情迁移 提交于 2019-11-29 15:22:53
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'; // Instantiate a DialogFlow client. const dialogflow = require('dialogflow'); const sessionClient = new dialogflow

Is it possible to play audio file or stream?

ぃ、小莉子 提交于 2019-11-29 12:19:54
Is it possible to play audio file or stream using actions-on-google-nodejs library? Nick Felker Using SSML you can return an audio clip up to 120s. <speak> <audio src="https://actions.google.com/sounds/v1/animals/cat_purr_close.ogg"> <desc>a cat purring</desc> PURR (sound didn't load) </audio> </speak> Edit If you want to play audio the mp3 file (over 120s), you need to use Media Responses if (!conv.surface.capabilities.has('actions.capability.MEDIA_RESPONSE_AUDIO')) { conv.ask('Sorry, this device does not support audio playback.'); return; } conv.ask(new MediaObject({ name: 'Jazz in Paris',