
Mickey666Maus
Germany
Asked
— Edited
Hey guys, I have been researching a bit on the api.ai and found a simple way to use it on my laptop or phone by using this code from GitHub...
https://github.com/sitepoint-editors/Api-AI-Personal-Assistant-Demo
Just change the accessToken and you are good to go...
Maybe someone from the forum with more scripting abilities could use this to create a plugin for ARC?
Hey guys, this morning I realized it will take some time until I will be putting up a YouTube clip, since I am just too slow in getting this type of stuff done...I am also still kind of in the middle even getting my robot ready for the testing environment!
So I thought to pace things up a little I will just upload a working version of the script to my serverspace for you to test it out... it is just a simple bot with the native smalltalk agent, no training whatsoever!
The only thing I did to bridge it with ARC is to add a httpGet(theUrl) fuction after the respond(spokenResponse) funtion which sends the variable that is returned by the query within the action parameter, in this case it would be smalltalk.greetings or smalltalk.greetings.hello etc , over to the server to trigger a command for the robot!
What I am still trying to accomplish would be getting data into api.ai...eg to store data lets say via IFTT MakerWebhooks to the server in a correct format so the fullfiment in api.ai will be able to read the data correctly. Any information on this would be highly appreciared!
I uploaded the code for testing, and could also leave it there if we would decide to collaborate in building and agent, or just as a testing enviroment!
http://www.downtown-tattoo.de/robotics/test123.html
edit same problem on the link...please remove https and put http to your browsers address bar...
Here you go: https://synthiam.com/redirect/legacy?table=plugin&id=193
@DJSures Man you are the best!
I will check the plugin right now, this is awesome!


The plugin works great! I would love to do some copy and paste hacking on it if you would mind to share the Visual Studio Project...
I tried to follow the instructions on how to create a plugin but had trouble with the .net version and with compiling the project, but I guess if I had a working file I could try to get into how it has been set to work!
What I would like to get done are basically two things, one would be to send some data to api.ai from within ARC...the other thing is that it would be great to also have the other returned variables exposed in ARC rather than just the speech variable! (this should not be too much of a problem I guess?)
If for instance the actions variable would be exposed, we could use it to drive our robots actions which are be tied to the variables value...eg if actions would return smalltalk.greetings, this could be used to trigger a certain movement!
Thank you so much for this great plugin! It is awesome to have this integrated within ARC! I know that you are super busy so it is very much appreciated!


use the ControlCommand() to send data within ARC
I can add the other variables
There you go: https://synthiam.com/redirect/legacy?table=plugin&id=193
@DjSures

You are awesome!


This is supercool, it all works as a charm!
The only thing is that I am still a little puzzled on how to send data over to api.ai, it appears to be a little difficult...if webhooks are enabled api.ai seems to be needing a response which includes a header and a body...something like this!
So how would I send my variable to api.ai using the ControlCommand() function? a more detailed description on webhooks is documented here...
https://docs.api.ai/docs/webhook
Read the example in the description of the plugin. Forget about webhooks. Forget about json. Forget about wget. Read the plugin page. I took time to write how to use it AND provided an example.
Just use the plugin and send the text using controlcommand()