Google Natural Language adapter
This is a Google Natural Language adapter for Node.js Bot Platform. You need to provide:
projectId
is a google project ID;keyFilename
is path to the json file with google keys;logger
is an instance of your logging tool.
;const googleNaturalLanguageAdapter = ;
After you can create an instance of GNL and use it's methods:
const googleNaturalLanguage = ; googleNaturalLanguage;googleNaturalLanguage;googleNaturalLanguage;
Please, look at usage example.
Tunneling
Check tunneling.js
. To bind context of all client's function we need to perform tunneling on each request, so inside skills you can do googleLanguage.annotate('Some text)
without specifying application tokens.
Look at router-builder.js as an example.