dfb-luis-apps-lib
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.11 • Public • Published

    Middleware for LUIS authoring

    Apps, versions, and models

    Given an endpoint and key, the middleware returns an object with an array of all apps, with versions per app, with models per version.

    How to run

    1. npm install dfb-luis-apps-lib

    2. Create index.js with the following:

      const LuisDataTable = require('dfb-luis-apps-lib').LuisDataTable;
      const getDataTable = async () => {
          try {
              const values = {
                  'endpoint': 'https://westus.api.cognitive.microsoft.com/',
                  'key': 'REPLACE-WITHh-YOUR-AUTHORING-KEY'
              };
              const features = {
                  'versions': true,
                  'models': true
              };
      
              return await LuisDataTable.getDataTable(values, features);
      
          } catch (err) {
              console.log(err);
          }
      }
      
      getDataTable().then((dataTable) => {
          console.log(JSON.stringify(dataTable));
      }).catch(err => {
          console.log(err);
      })
      
    3. Change the endpoint and the key to your own authoring key and endpoint.

    4. Run at the terminal or command line with: node index.js > apps.json.

    5. Open apps.json file to review output.

    Caveats

    • Values object is required.
    • Features object is optional. Turn features on get the versions and models.
    • .d.ts files are available for typescript projects.

    Keywords

    none

    Install

    npm i dfb-luis-apps-lib

    DownloadsWeekly Downloads

    6

    Version

    1.0.11

    License

    ISC

    Unpacked Size

    361 kB

    Total Files

    47

    Last publish

    Collaborators

    • avatar