module that connects framerjs and via ajax
JavaScript CoffeeScript Other
Latest commit 8595a77 Dec 29, 2016 @mamezito committed on GitHub Update
Failed to load latest commit information.
apiaisend.framer initial setup Dec 28, 2016
pizzaHutMessengerBot.framer initial setup Dec 28, 2016 Update Dec 29, 2016 initial setup Dec 28, 2016


module that connects framerjs and via ajax lets you build brand-unique, natural language interactions for bots, applications, services, and devices. You can use it for chatbots, wearables, apps, automotives, smarthomes. Currently has integrations with facebook, telegram,slack, and actions on google and many more.

FramerJS module allows you to send text string to your aggents in APIAI and run callback function with response data. So its ideal if you are prototyping something like facebook messenger bot or google home.

More info on query -

here is basic usage of the module -

api_ai = require 'apiai'
#change token to your token here
token = "9973f0c5fc2d4f6f90243d51d73c3294"

string="how are you?"

#session number, must be unique per session, if u plan to use intents in
session=Utils.randomNumber(0, 100000)

    #data - is JSON response we get from apiai when we send string of text, you can check structure of response here -
    #resolvedQuery is our string, speech - is the answer from the bot in
    print data.result.resolvedQuery, data.result.speech

#we are calling send function from module with following properties
#string of text(query)
#callback function - in our case printfunc, but can be any of your functions with data as property
#token - you client token for your project
#session - random number generated per session

api_ai.send string,printfunc, token,session

example of used with pizza delivery sample

google home sample with speech recognition on framer end and chat mechanics on apiai side (chrome only) - (little buggy when google home has long responses:) This prototypes uses predefined domains from apiai called small talk -