change request format sent to dialogflow agent - python-3.x

User queries to dialogflow agent through google assistant using voice commands.I want to add some data in that user query. can we change the request parameters sent to agent? If yes, where? The code for google assistant library is in python.
I am working on python 3.5 on raspberry pi 3. I tried modifying event.py file located at google/library/assistant/ . But before the event for ON_RECOGNISING_SPEECH_FINISHED I got response from google assistant.

No, if you're using the Google Assistant SDK, you interact with the agent as if it was any other Google Assistant surface. There is no way to add additional context that is exclusive to your device.

Related

Dialogflow Hangout Integration with Card Response

I am using Dialogflow and fullfilment for dynamic response and integration has been done with Hangout. Text response is working fine. But when i use rich media like CARDS (Hangout API), It is not working. Can you please let me know what was i am missing or how to use cards for hangouts using dialogflow-fullfilment agent?
Stack Driver Log Image
Thanks and Regards,
Ramchandra-Sah GANESH
I wrote a blog about this, since I've figured some small quirks.
The best is to test this first within the Dialogflow UI console, by choosing custom payloads for Hangouts.
Note:
The first key can't be called cards, but it has to be named to hangouts
This hangouts key points to an object, not an array (of cards)
Have a look into this blog to get further details. (For example on using this with webhook code) How to build chatbots for Hangouts with Dialogflow by using custom payloads and cards.

Dialogflow- chatbot related queries

I've created a basic app with a chatbot that can respond to what I type using DialogFlow and Angular. It is hosted locally. Now I want to have that chatbot respond to what I type with cards, lists and such. Like how Messenger has templates. I want to have a custom payload sent to me in response to what I send. Can anyone please help me? (NOTE: iam using the v2api)
Dialogflow supports rich message response to only certain platforms that it has listed on its website for ex. Facebook, google assistance etc. To display rich message you need to code it out.

Transaction API not working in mobile google assistance

Google Transaction API has been implemented in Dialogflow Fulfillment. In my intent function my code is like agent.add(agent.conv().ask(new TransactionRequirements())). This code was running properly and giving response in google action console only before deployment in alpha test. But that time in mobile google assistance there were no response as well as no log in google firebase function. After deployment in alpha test the response is coming in google action console i.e
DISPLAY REQUEST RESPONSE AUDIO DEBUG ERRORS Invocation Error You
cannot use standard Google Assistant features in the Simulator. If you
want to try them, use Google Assistant on your phone or other
compatible devices.
Now also in mobile google assistant still response not coming. What is the solution for that?
let tran = new TransactionRequirements();
agent.setContext(context);
agent.add(agent.conv()
.ask(tran)
)
#stackjohnny

Google Home send GET request and say response

There is an API available online that responds with a number (number of points) when you submit a GET request to a certain URL.
I'd like my Google Home to say this information when I ask it to. I have attempted to do this with DialogFlow but I'm not sure how I would go about doing it.
EDIT: I used the DialogFlow fulfillment webhook feature. DialogFlow sends a post request to my webserver and the server responds with "fulfillmentText" which is what the Google Home will say.
There is nothing built-into Google Home that will get information out of the page at a URL.
You can write a program that will be triggered by the Assistant using Actions on Google. This includes something that would run through Dialogflow, or it could run through the Actions SDK. Either way - you would do this by writing a program that would be called in a webhook to fetch the data and return a message that would be read by the Assistant on your Home.

Google Actions with custom webhook

I have built a small conversational bot using API.AI with Node.js as the back end. So every time a user makes a request it goes to my server and then from my server to API.Ai and it follows the same route with a response.
Now, I want to integrate it with Google Actions. But, Google Actions allows me to use API.AI as my webhook whereas I want Google Actions to talk to my server.
I have checked everywhere and can't find the correct process. Any, help will be appreciated in Integrating Actions with custom webhook instead of API.API
The normal way it would work would be to have the Google servers for the Assistant talk to API.AI, and then API.AI would call your webhook. This lets API.AI do all of the natural language processing (NLP) and not have you attempt to write this part yourself to load into the Actions console.
Your API.AI project and your Action project need to be the same - if not, you can create a new Action project using the same project as API.AI, or you can export the contents of your API.AI project and import it into a new one.
Your API.AI project also needs to have the Actions on Google Integration turned on. From the left menu, select Integrations and then the Actions on Google tile and turn it on.
However
If you want to send things through your server, and then have your server call the API.AI API yourself, you can certainly do this. You would develop against the Actions SDK and provide an actions.json file which describes the intents and webhook to use.

Resources