Skip to content

raffi1965/EnzoBot

Repository files navigation

Todo bot with LUIS and QnA Maker

This sample demonstrates using Adaptive dialog, Language Generation features with LUIS and QnA Maker to demonstrate an end-to-end ToDo bot in action.

Prerequisites

To try this sample

  • Clone the repository

    git clone https://github.com/Microsoft/botbuilder-samples.git
  • Run the bot from a terminal or from Visual Studio:

    A) From a terminal, navigate to samples/csharp_dotnetcore/adaptive-dialog/08.todo-bot-luis-qnamaker

    # run the bot
    dotnet run

    B) Or from Visual Studio

    • Launch Visual Studio
    • File -> Open -> Project/Solution
    • Navigate to samples/csharp_dotnetcore/adaptive-dialog/08.todo-bot-luis-qnamaker folder
    • Select ToDoBotWithLUISAndQnAMaker.csproj file
    • Press F5 to run the project

Testing the bot using Bot Framework Emulator

Bot Framework Emulator is a desktop application that allows bot developers to test and debug their bots on localhost or running remotely through a tunnel.

  • Install the latest Bot Framework Emulator from here

Connect to the bot using Bot Framework Emulator

  • Launch Bot Framework Emulator
  • File -> Open Bot
  • Enter a Bot URL of http://localhost:3978/api/messages

Setup

Using CLI

  • Install nodejs version 10.14 or higher
  • Install required CLI tools
> npm i -g @microsoft/botframework-cli
  • In a command prompt, navigate to samples/csharp_dotnetcore/adaptive-dialog/08.todo-bot-luis-qnamaker
  • In order for interruption to work effectively, you need to generate LU models that are cross-trained.
    • Cross training requires a definition of your dialog hierarchy. See Dialogs/DialogLuHierarchy.config.json as an example.
> cd Dialogs
> bf luis:cross-train --in . --out ../generated --config DialogLuHierarchy.config.json --force
> bf luis:build --in ../generated --out ../generated --log --force --botName TodoBotWithLuisAndQnA --authoringKey <Your LUIS Authoring key>
  • This command writes out a bunch of .dialog files (which are useful if you are using declarative form of adaptive dialogs) as well as luis.settings.<youralias>.<region>.json file.
  • Add the application IDs for the created applications from luis.settings.<youralias>.<region>.json to appsettings.
  • Note: You can just re-run bf luis:build command as you make changes to your .lu content. The command will smartly update only those applications that have changes.
  • Get your QnA Maker subscription key
  • Run qnamaker:build to create/ update, train and publish QnA Maker KBs required to run this bot. The content for the KB comes from .qna files under dialogs.
> bf qnamaker:build --in ../generated --out ../generated --botName TodoBotWithLuisAndQnA --log --force --subscriptionKey <Your QnA subscription key>
  • This command writes out a bunch of .dialog files (which are useful if you are using declarative form of adaptive dialogs) as well as qnamaker.settings.<youralias>.<region>.json file.
  • Add the KB IDs for the created applications from qnamaker.settings.<youralias>.<region>.json to appsettings.json.

Further reading

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published