1.0.1 • Published 7 years ago
langai-node v1.0.1
langai-node 
A LangAI API client written in Node.js.
Check the API Docs and the Developer site for more info on how to use and integrate the API.
To work with the LangAI API, you must have a token. If you don't have a token already, request an invite.
Installation
Install langai-node in your Node.js project with npm.
npm install -save langai-nodeyarn add langai-nodeSee the example below on how to require and use the LangAI API to analyze intents in new texts. A projectId is required. Check the workflow documentation to get an overview of the process.
Usage
import Lang from 'langai-node';
// or
// const Lang = require('langai-node').default;
const lang = new Lang({
token: 'your-token',
});
lang
.analyze({
text: 'your-text',
projectId: 'your-projectId',
})
.then(data => {
console.log(data);
})
.catch(err => {
console.log(err);
});Note: This feature
importis only just beginning to be implemented in browsers natively at this time. It is implemented in many transpilers, such as TypeScript and Babel, and bundlers such as Rollup, Webpack and Parcel.