Skip to content

Latest commit

 

History

History
executable file
·
62 lines (50 loc) · 3.46 KB

DEPLOY.md

File metadata and controls

executable file
·
62 lines (50 loc) · 3.46 KB

How To Deploy

This bot relies on the LUIS.ai cognitive service to function. This document will show how to use simple command line tools to setup LUIS for use with this bot.

Install required tools

To successfully setup and configure the services this bot depends on, you need to install the MSBOT, LUIS, and Ludown CLI tools. See the documentation for the Bot Framework CLI Tools for additional information on what CLI tools are available to help you build your bot.

Ensure you have Node.js version 8.5 or higher

npm i -g msbot luis-apis ludown

Keeping track of service references using .bot file

We highly recommend you can keep track of all the services your bot depends on in a .bot file. You can use either the msbot CLI tool or use Bot Framework Emulator to manage your .bot file. This project was created with a bot file named basic-bot.bot

Configure all required services

You can use MSBOT to create and configure the required services for this bot. To do this, simply run the following command from a terminal. You can get your LUIS authoring key by following steps here and get your Azure subscription ID by following steps here.

> cd samples/javascript_nodejs/13.basic-bot

> msbot clone -n <YOUR BOT NAME> -f deploymentScripts/msbotClone --luisAuthoringKey <LUIS-KEY> --subscriptionId <AZURE-SUBSCRIPTION-ID>

Using the CLI tools to create and configure services

The LUIS application created for this bot is described in a markdown based .lu file(s) here. To update your published LUIS application with any changes made to the .lu files, run the following commands.

> cd samples/javascript_nodejs/13.basic-bot
  1. To parse the .lu files to a LUIS model:
    > ludown parse toluis --in dialogs/greeting/resources/main.lu -o cognitiveModels/ --out basicBot.luis -n 'basic-bot-LUIS' -d 'Basic bot Bot Builder V4 sample.' --verbose
  2. To create a new LUIS application using the LUIS model generated in step 1 and update the .bot file with the LUIS service configuration:
    > luis import application --in cognitiveModels/basicBot.luis --authoringKey <YOUR-LUIS-AUTHORING-KEY> --msbot --endpointRegion --region <LUIS-AUTHORING-REGION> | msbot connect luis --stdin
    You can obtain your LUIS authoring key by following instructions here LUIS authoring regions are listed [here][10]. They can be one of westus | westeurope | australiaeast.
  3. To train the LUIS application,
    > msbot get basic-bot-LUIS | luis train version --wait --stdin
  4. To publish the LUIS application,
    > msbot get basic-bot-LUIS | luis publish version --stdin

See Bot Builder tools to learn more about the Bot Builder CLI tools.