Skip to content

Latest commit

 

History

History
 
 

basic-bot

This bot has been created using Microsoft Bot Framework,

    • Use LUIS to implement core AI capabilities
  • Implement a multi-turn conversation using Dialogs
  • Handle user interruptions for such things as Help or Cancel
  • Prompt for and validate requests for information from the user

To try this sample

  • Clone the samples repository
git clone https://github.com/Microsoft/botbuilder-samples.git
  • [Optional] Update the appsettings.json file under botbuilder-samples/samples/csharp_dotnetcore/13.basic-bot with your botFileSecret.

    • For Azure Bot Service bots, you can find the botFileSecret under application settings.
    • If you use MSBot CLI to encrypt your bot file, the botFileSecret will be written out to the console window.
    • If you used Bot Framework Emulator V4 to encrypt your bot file, the secret key will be available in bot settings.
  • Create required services

[Alternate to CLI] Set up LUIS via Portal

Visual Studio

  • Navigate to the samples folder (botbuilder-samples/samples/csharp_dotnetcore/13.basic-bot) and open BasicBot.csproj in Visual Studio.
  • Press F5.

Visual Studio Code

  • Open botbuilder-samples/samples/csharp_dotnetcore/13.basic-bot sample folder.
  • Bring up a terminal, navigate to botbuilder-samples/samples/csharp_dotnetcore/13.basic-bot folder.
  • Type 'dotnet run'.

Testing the bot using Bot Framework Emulator

Microsoft 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 Bot Framework Emulator from here.

Connect to bot using Bot Framework Emulator

  • Launch the Bot Framework Emulator
  • File -> Open bot and navigate to botbuilder-samples/samples/csharp_dotnetcore/13.basic-bot folder
  • Select BotConfiguration.bot file

Deploy this bot to Azure

You can use the MSBot Bot Builder CLI tool to clone and configure any services this sample depends on. To install all Bot Builder tools -

Ensure you have Node.js version 8.5 or higher

npm i -g msbot chatdown ludown qnamaker luis-apis botdispatch luisgen

To clone this bot, run

msbot clone services -f deploymentScripts/msbotClone -n <BOT-NAME> -l <Azure-location> --subscriptionId <Azure-subscription-id>

Further reading