- Install Git(If not installed). https://git-scm.com/downloads
- Open the command prompt and navigate to the folder you want to get the sample code(eg:-E:\Karthik\GAB2019).
- Run the command in the command prompt.
git clone https://github.com/karthikeyanVK/LuisChatBot.git
- Open the LuisChatBot.sln in Visual studio 2017
- Navigate to https://www.luis.ai/ and sign in with microsoft account.

- Click on “Import new app”.

- Click on “Choose app file(JSON format). And choose the file “home-automation.json” from the cloned folder.

- Go back and then import two more files(one by one) “nlp-with-dispatchDispatch.json” and “weather.json”
- You should see the list as below with all three, weather, nlpdispatch, Homeautomation apps added.

- Select the Weather from the list to navigate and click on Train.

- Click publish.

- Click on the popup.

- Click on “Refer to the list of endpoints”

- Copy the below values to nlp-with-dispatch.bot. Only application id is different for all three apps, other details are all same for all apps.

- Train and publish the same for nlpdispatch and HomeAutomation. Get the keys as above, and fill the values respectively in nlp-with-dispatch.bot as below.

- Now fill the qna values in the nlp-with-dispatch.bot which we got from the previous exercise.
endpointKey | 1fe62337-254f-4d5e-917e-b2822ba625a2 |
hostname | https://qnademo2504.azurewebsites.net/qnamaker |
kbId | f643adc4-a631-4702-90c5-41e4da037bd6 |
subscriptionKey | Refer step 17. |
- Navigate to https://portal.azure.com/ and search for the web app bot you created, and the copy the subscription id.

- Now your nlp-with-dispatch.bot should look like this.

- Install from https://github.com/Microsoft/BotFramework-Emulator/releases/download/v4.3.3/BotFramework-Emulator-4.3.3-windows-setup.exe
- Open the emulator. Click on File and select New Bot Configuration.

- Give a Bot name and Endpoint URL as http://localhost:3978/api/messages. Click on Save and connect

- After save and connect open the saved .bot file by click on Open bot in the file menu.

- Chat with LUIS enabled bot as below.

- Now let us create a new app and integrate to our sample.
- Navigate to https://www.luis.ai/ and import the travelagent.json.
- Train and publish and gather configuration details and enter it in the nlp-with-dispatch.bot as below. Above home automation configuration

- Create NlpDispatchBot.cs and add private variable named as travelagent.

- Update the NlpDispatchBot as below.
