How to use the @microsoft/bf-lu/lib/parser/lufile/parseFileContents.js.parseFile function in @microsoft/bf-lu

To help you get started, we’ve selected a few @microsoft/bf-lu examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / BotBuilder-Samples / experimental / adaptive-tool / src / lu / providers / completion.ts View on Github external
private extractLUISContent(text: string): Promise {
    let parsedContent: any;
    const log = false;
    const locale = 'en-us';
    try {
      parsedContent = parseFile(text, log, locale);
    } catch (e) {
      // nothing to do in catch block
    }

    if (parsedContent !== undefined) {
      return Promise.resolve(parsedContent.LUISJsonStructure);
    } else {
      return undefined;
    }
  }
}

@microsoft/bf-lu

This package is intended for Microsoft use only. It is not designed to be consumed as an independent package.

MIT
Latest version published 3 years ago

Package Health Score

62 / 100
Full package analysis

Similar packages