dialogflow

PHP MySQL Dialogflow

旧城冷巷雨未停 提交于 2019-12-01 13:16:16
问题 I'm setting up a chatbot (dialogflow) with a PHP webhook What I want to do is to take the user input to query a MySQL table and pass the result back to the dialogflow API So far I succeeded with passing a text string back to the API, but I don't understand how to query the database and pass the result back to the dialogflow API I'll appreciate your help with this I've used the API format from the dialogflow docs here This is what I have <?php $method = $_SERVER['REQUEST_METHOD']; if($method =

Dialogflow integration of enterprise edition v2 into the ios and andriod app

一个人想着一个人 提交于 2019-12-01 11:21:49
问题 Iam previously using the v1 version of the dialogflow and then they announced that they are going to suspend it.I migrated my code in the cloud functions to the v2. But i could not find a way to integrate it into the ios and android apps. Please help me out. Thanks. 回答1: To update your agent to V2, you should create a Cloud Function for Firebase that sends requests to Dialogflow (using dialogflow-nodejs-client-v2), then call that Cloud Function from your iOS or Android code rather than

How to implement Login in Dialogflow chatbot

我是研究僧i 提交于 2019-12-01 10:50:53
问题 i want to add login to my chatbot with webhook.I want to take username and password from user and send it to the webhook. 回答1: I know you didn't got much search results for that there are following approaches If you use only Google Assistant for chatbot then use built in "Sign-in" required option and then open link https://console.actions.google.com/project/ your-project-name /accountlinking/ and in that provide your required settings like "Do you want signup ?" or "Login Only" select type of

Best way to handle ranges in api.ai?

 ̄綄美尐妖づ 提交于 2019-12-01 09:59:56
问题 I have a real estate bot where I need to handle the following cases. - I am looking for a house with 1200 sqft - I am looking for a house with 1200 - 1500 sqft - I am looking for a house between 1200 sqft to 1500 sqft Another case is my bot asking How many square feet are you looking for? User says 1500 A couple of questions How do I handle ranges and normal values with or without units How do I restrict the values to be in a certain range (under 10000) for example. I also have a case where I

DialogFlow v2 Access Token cannot generate

萝らか妹 提交于 2019-12-01 08:30:13
With version 1 this is how I used to communicate with DialogFlow Api! fetch(configs.baseUrl + "query?v=20150910", { body: JSON.stringify({query: text, lang: "en", sessionId: "somerandomthing"}), headers: { 'content-type': 'application/json', "Authorization": "Bearer " + configs.accessToken, }, method: 'POST', }) .then(response => response.json()) .then(data => { console.log(data.result.fulfillment.speech); return data.result.fulfillment.speech; }) .catch(error => console.error(error)) I simply had to pass the access token into header and that was it! I dont know how can I make this code work

How to identify unique users with Diagflow

让人想犯罪 __ 提交于 2019-12-01 05:56:55
I am trying to make an assistant app and was using the cloud firestore service of firebase to send the response back to my app using webhook as fulfilment. I have used 'session' parameter in request JSON according to this documentation and sending fulfilmentText as response to the user. But whenever user launches the app, a new session is created which I don't want. I simply want, just a single entry for each user in my database so how to achieve that using dialogflow. In Alexa Skill, we have deviceId as parameter by which we can uniquely identify the user irrespective of the session id but is

Can't find the function url for Firebase webhook in Google Assistant tutorial

北慕城南 提交于 2019-12-01 05:11:12
I've been doing the Codelabs tutorial on " Facts about You: Build a conversational app for the Google Assistant " but have run into a problem. Page 4 of the tutorial is devoted to using Cloud Functions for Firebase for setting up a webhook to provide custom responses. Step 7 on that page says "Once the Cloud Functions is deployed, the Function URL will be printed in the Firebase CLI logs. This URL is separate from the Project Console URL.” My problem is that I only see the Console URL. I don’t see a Function URL anywhere. Can anyone please clarify where I should find the Function URL? My app

Actions on Google returns in simulator “We're sorry, but something went wrong. Please try again.”

喜你入骨 提交于 2019-12-01 04:12:15
Debug tab: { "response": "We're sorry, but something went wrong. Please try again.", "expectUserResponse": false, "conversationToken": "", "audioResponse": "" } I create the sample project in Dialogflow and it works, but in the simulator Actions on Google it doesn't! Takashi MOGAMI Please read the "Preview the app" section of this page: https://developers.google.com/actions/dialogflow/first-app?hl=en To preview your app: Turn on the Web & App Activity, Device Information, and Voice & Audio Activity permissions on the Activity controls page for your Google account. You need to do this to use

How can I create a list of a combination of attributes in API.AI (Dialogflow)

断了今生、忘了曾经 提交于 2019-12-01 04:08:37
问题 I have a requirement where I want to accept a list of 2 attributes from API.AI, for example, the user can say any of the following: add 2 oranges and 3 bananas 2 my cart add 2 oranges 3 bananas and 5 apples to my cart So it should send a list of the combination of count and fruit-name to my application. Any suggestions? 回答1: You can do this with Composite Entities. First, create an entity that lists all of the fruit and their synonyms (let's call it fruit ). Then create a composite entity

How to identify unique users with Diagflow

我的梦境 提交于 2019-12-01 03:44:01
问题 I am trying to make an assistant app and was using the cloud firestore service of firebase to send the response back to my app using webhook as fulfilment. I have used 'session' parameter in request JSON according to this documentation and sending fulfilmentText as response to the user. But whenever user launches the app, a new session is created which I don't want. I simply want, just a single entry for each user in my database so how to achieve that using dialogflow. In Alexa Skill, we have