Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

apiai

api-ai12kApache 2.04.0.3TypeScript support: included

Node.js SDK for api.ai

apiai, NLU, natural, language, understanding

readme

Node.js SDK for Api.ai

This plugin allows integrating agents from the Api.ai natural language processing service with your Node.js application.

Installation

  • Install Node.js
  • Install Api.ai SDK with npm:
    npm install apiai

Usage

  • Create main.js file with the following code: `javascript var apiai = require('apiai');

var app = apiai("<your client access token>");

var request = app.textRequest('<Your text query>', { sessionId: '<unique session id>' });

request.on('response', function(response) { console.log(response); });

request.on('error', function(error) { console.log(error); });

request.end();

* Run following command.
```shell
node main.js
  • Your can find more examples in samples directory.