dialogflow

How to add extra fields in request JSON sent to DialogFlow former Api.ai

梦想的初衷 提交于 2019-12-10 23:55:33
问题 I am trying to append extra information to the jsonrequest that is sent from my application to DialogFlow . I am aware of the possibility to send data calling an intent by triggering its event from Sending Parameters in a Query Request, and I am using that method already for other functionality. Basically, I am trying to add a value with the userID , and I need to retrieve that value in DialogFlow . I am keepeing track of the session in php, so I am using phpto get ID value. I have tried to

[Dialogflow]Update Permission through Webhook format (for push notifications)

∥☆過路亽.° 提交于 2019-12-10 23:54:59
问题 ORIGINAL REQUEST: I'm trying to implement the push notifications following the documentation: https://developers.google.com/actions/assistant/updates/notifications I'm using Dialogflow with webhooks (in PHP) and the documentation is giving example in nodeJS Right now, i'm blocked because of the Update permission, here's my Webhook response : { "source": "webhook", "payload": { "google": { "expectUserResponse": true, "systemIntent": { "intent": "actions.intent.PERMISSION", "data": { "@type":

how to make a dialogflow google agent respond and acknowledge on firebase's field change

北战南征 提交于 2019-12-10 22:52:53
问题 'use strict'; const functions = require('firebase-functions'); const admin = require('firebase-admin'); const {WebhookClient} = require('dialogflow-fulfillment'); process.env.DEBUG = 'dialogflow:*'; // enables lib debugging statements admin.initializeApp({ credential: admin.credential.applicationDefault(), databaseURL: "https://my_db.firebaseio.com/", }); var database = admin.database(); var transition = database.ref('/stage'); exports.dialogflowFirebaseFulfillment = functions.https.onRequest

Google Assistant advanced responses with API.AI

懵懂的女人 提交于 2019-12-10 22:28:46
问题 I already have a webhook, and I am using it to change the assistant answers. But I can't figure out how to send a suggestions card or a link, as you can send them from API.AI web GUI ( From the add content button ). Should I send them as a JSON object under the data name. API.AI webhook documentation 回答1: The general form for the JSON body of a response to a API.AI fulfillment webhook call that will include a Action on Google rich response for a simple response and a card is below. If you

DialogFlow - Get original string associated with parameter

自闭症网瘾萝莉.ら 提交于 2019-12-10 22:26:53
问题 Suppose I have a query like: Turn on the lights from 5pm to 11pm. I have a time-period entity that matches "5pm to 11pm", and the agent correctly parses the entity into two DateTime objects in the response. However, I need to get a mapping of the snippets of original text to the parameter, i.e. Original Text -> Parameter Name, e.g. "5pm to 11pm" maps to the "time-period" entity. Ideally, I would like the original text along with the parsed objects. Is this possible? 回答1: If you are using just

Take Dialogflow intent and query Firestore

独自空忆成欢 提交于 2019-12-10 19:43:32
问题 My chatbot has been created in Dialogflow and I am now trying to access it from Python, to take user inputs and display outputs in the GUI (think a basic chatbot gui). I have connected my Python environment to Dialogflow and to firestore, Here is the code that detects intents; #Detection of Dialogflow intents, project and input. def detect_intent_texts(project_id, session_id, texts, language_code): #Returns the result of detect intent with texts as inputs, later can implement same `session_id

Handle audio play completion callback in dialogflow (Media responses)

假如想象 提交于 2019-12-10 18:38:51
问题 I'm handling an intent by playing a MediaObject . I want to create an intent handler that will catch the callback of media play completion, the documentation shows an example on how to write fulfillment code to handle it. Building your fulfillment The code snippet below shows how you might write the fulfillment code for your Action. If you're using Dialogflow, replace actions.intent.MEDIA_STATUS with the action name specified in the intent which receives the actions_intent_MEDIA_STATUS event,

How to import Alexa skill into API.AI / Dialogflow?

孤街醉人 提交于 2019-12-10 17:16:40
问题 I'm trying to export my Alexa Skill / import it into Dialogflow (used to be called API.AI), but I'm getting the following error message: Invalid Alexa schema json file. My Zip file is the index.js file and the node_modules folder zipped together. Then I added the Alexa Skill JSON named schema.json to the zip too, but it still gives the same error. I cannot find instructions on how to export the correct Alexa .zip for import, nor how to format the zip to build it myself. I've been searching

How to add audio from firebase storage in actions on Google?

 ̄綄美尐妖づ 提交于 2019-12-10 14:31:35
问题 To be very clear I want to know how to add audio from firebase storage in actions on Google? I've been stuck in this question since few weeks. I've uploaded my audio in the firebase storage and from it I have copied the link provided by Firebase and and pasted the audio's URL in the given format in speech output. Check how I did:- <speak> <audio src="https://firebasestorage.googleapis.com/v0/b/enrich-58fdf.appspot.com/o/xxx.mp3?alt=media&token=aabcd430-9d46-45f6-ad21-fdca0895123f"> </audio> <

How to manage the 5 seconds response timeout limit in Dialogflow / Api.ai?

ⅰ亾dé卋堺 提交于 2019-12-10 13:19:34
问题 I am using Dialogflow to create an agent / bot which responds to different types of user queries with action items like "I need to get a letter from the HR for address proof". This needs the bot to fetch some information from the company's database and generate a document / letter by populating that retrieved information in a templated letter file provided by the Human Resource. The logic to do this action is already written in a python file. The database integration is done using Webhooks.