New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

apiai

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apiai

Node.js SDK for api.ai

4.0.3
latest
Source
npm
Version published
Maintainers
1
Created
Source

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
  • Usage

Installation

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

Usage

  • Create main.js file with the following code:
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.
node main.js
  • Your can find more examples in samples directory.

Keywords

apiai

FAQs

Package last updated on 11 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts