UNPKG

luis-sdk-async

Version:

A wrapper for Microsoft's `luis-sdk` package that uses async-await instead of callbacks.

15 lines (11 loc) 323 B
const Luis = require('./index'); (async () => { const luis = new Luis('<APP ID>', '<KEY>'); try { await luis.send('<TEXT TO SEND TO LUIS>'); } catch (error) { console.log(error); } console.log(`intent = ${luis.intent()}`); console.log(`entity = ${luis.entity('<ENTITY TYPE>')}`); })();