dialogflow

Making DialogFlow v2 DetectIntent Calls w/ C# (including input context)

回眸只為那壹抹淺笑 提交于 2019-12-05 18:37:40
So I finally figured out a way to successfully make detect intent calls and provide an input context. My question is whether or not this is the CORRECT (or best) way to do it: (And yes, I know you can just call DetectIntent(agent, session, query) but I have to provide a input context(s) depending on the request) var query = new QueryInput { Text = new TextInput { Text = model.Content, LanguageCode = string.IsNullOrEmpty(model.Language) ? "en-us" : model.Language, } }; var commonContext = new global::Google.Cloud.Dialogflow.V2.Context { ContextName = new ContextName(agent, model.sessionId, "my

Account Unlinking on Actions on Google

给你一囗甜甜゛ 提交于 2019-12-05 16:19:17
I'm developing an action on Google that requires the user to login with my services. I was able to implement account linking . That works fine; I'm able to complete the entire flow to authenticate the user using the Google Home app, but I couldn't find a way to unlink the account. The service does not appear at Apps with access to your account Is there any way to unlink an account? The "preview" feature on both API.AI and Actions SDK will clear any existing OAuth tokens for your action on your account. After running "preview" and invoking your action -- "OK Google, talk to $invocationName" --

DialogflowApp askForUpdatePermission Not Working

寵の児 提交于 2019-12-05 06:59:08
1) askForUpdatePermission not finding intent I followed the Update Sample at Github -dialogflow-updates-nodejs and got the update permission to work. But when I added app.askForUpdatePermission("get.next.reminder") into my own code, the simulator says that my agent is not responding. I did not get the question to give update permission. In the simulator error tab, I see an error: MalformedResponse expected_inputs[0].possible_intents[0].input_value_data: The intent the app is asking for permission to send updates for is not found.. So I checked the intent name (get.next.reminder) again in my

Requesting User Location from Google Actions with Api.ai

感情迁移 提交于 2019-12-05 02:59:35
问题 Google Actions can provide you with the user's location, name, and few other details. How can this be done on Api.ai without the nodejs SDK? All examples from Google are using the Nodejs sdk. According to the Conversation Api it is just a matter of putting the correct json in the response, however it is unclear how to get Api.ai to fill in this json. I've read the docs here , but am still unclear. Sample code, or more detailed documentations, would be great for the non nodejs developers. I'm

How to use new Dialogflow SDK V2 in Android

扶醉桌前 提交于 2019-12-05 02:34:53
问题 I'm a bit confused about the migration to Dialogflow V2: I have an Android app using https://github.com/dialogflow/dialogflow-android-client (1) that makes voice recognition via "AIService" and request to my Dialogflow Agent V1. Now with the release of Dialogflow V2, the docs point me to use: https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-dialogflow But I can not see correspondence to AIService in this new SDK for Java... all I've found is this: https:/

How can I make http call to DialogFlow V2 using simple ajax jQuery?

本秂侑毒 提交于 2019-12-04 21:05:00
I have been using DialogFlow v1 before using simply jquery and it was pretty straigh forward working! Now that I have to switch to V2 I am stuck on how to keep somehow same code but just modify with the V2! I have been looking at this client library for V2: https://github.com/dialogflow/dialogflow-nodejs-client-v2#using-the-client-library But I dont wanna use Node.js I just dont want to do somthing like node server.js to run the app, also I am not sure if I can mix jQuery with Node.js. My previous code v1 looked like this: fetch(url, { body: JSON.stringify(data), // cache: 'no-cache', //

Google Assistant flow with multiple actions_intent_OPTION handlers

℡╲_俬逩灬. 提交于 2019-12-04 19:04:53
I have webhooks configured through Dialogflow for a template chatbot UI starter project I'm making on Github. I have a bot integrated through Facebook Messenger and Google Assistant. All of Facebook works fine because the actions send back strings and it's easy to handle. But when Google Assistant tries to handle items of "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec", actions_intent_OPTION is needed on the event in Dialogflow to handle the response. If I have just one in my app, it works fine, but when I add a second list item / carousel item of type OptionValueSpec, the

How to reset a parameter value so agent can ask for the parameter again?

∥☆過路亽.° 提交于 2019-12-04 17:26:46
I have created a dialogflow agent and multiple intents in it. One such intent asks for 2 parameters : account and balance_type. It then sends the webhook request where the code is written to check if the account number exists in the DB. If it does it fetches the balance and sends back to the user. Now in case the account number does not exist, i have to ask the user to again enter the account number (value for "account") only. Any thoughts on how i can achieve it ? You will need to play with context here. If your account parameter is collected first you can continue like the following: enable

How to set a custom platform in Dialogflow NodeJS Client

心已入冬 提交于 2019-12-04 15:12:52
I have created a webhook using dialogflow-fulfillment to correctly return different data depending on the platform, including a custom one I created for another service. I've tested my webhook and know that if I change the originalDetectIntentRequest.source to the platform used in my custom payload it works. { "payload": { "jokes-api": { "success": true, "text": "These are some jokes", } }, "outputContexts": [] } I am able to use dialogflow-nodejs-client-v2 's sessions.detectIntent to get a response, but the fullfilment comes back with the platform set as PLATFORM_UNSPECIFIED , and not the

How to get results from MySql DB using node.js MySQL and send them back to API.ai - DialogFlow

心已入冬 提交于 2019-12-04 14:34:57
问题 I am having issues retrieving and sending results from a MySql database to API.ai. The concrete question is how to wait for the results to be available, and then send the results in the Json object back to API.ai This is what I have: In the webhook or service, after receiving the Json request, I call a method: if (action === 'get.data') { // Call the callDBJokes method callDB().then((output) => { // Return the results to API.AI res.setHeader('Content-Type', 'application/json'); res.send(JSON