Skip to content

Azure Bot Framework demo using LUIS, Bot Builder SDK, Dialogs, AdaptiveCards, and more

License

Notifications You must be signed in to change notification settings

NateRickard/CycleShopBot

Repository files navigation

Cycle Shop Bot

A demo Azure Bot Framework sales bot for a fictitious cycling shop. Say "Hi" and it will guide you on some of the things it can help with.

Highlights:

  • An Azure Function-based backend (compiled C# function)
  • Bot Builder C# SDK (v3.15.2.2 - current production/stable release as of this writing)
  • LUIS language understanding model for:
    • Triggering different intents/dialogs within the bot
    • Maintaining domain lists for product offerings & regions using LUIS List Entities
  • Many bot features:
    • Multiple bot Dialogs and dialog transfer (Call, Fail, etc.)
    • Adaptive Cards and other card support
    • Suggested Actions
    • Choice prompts
    • Postback card actions
    • Example of inspecting current channel and altering behavior per channel
  • Calling into Node.js functions hosted side by side with C# functions
  • A demo mode to use/demo the bot without needing the SAP instance

Sample Conversation UI

Via the Bot Framework Emulator v3

Setup

  1. Create a bot in the Azure portal using the Functions Bot template.

  2. Go to the LUIS dashboard and find the new LUIS application that was created as a part of the bot template. Import the json model found in the /data folder. Train and publish the model.

  3. Add an application setting named MockData and set its value to true.

  4. Download the new bot source from the portal.

    NOTE: You may need to do this from the Functions UI in Azure (Build tab -> "Open this bot in Azure Functions" -> "Download app content", making sure to check the box to include the app settings file).

  5. Grab the local.settings.json file from the downloaded content and add/include this into the Cycle Shop solution root. Verify it contains the newly added MockData setting and add it if needed.

  6. Build the solution and Publish your Cycle Shop Bot solution to Azure, or Set up continuous deployment via your source code repo.

  7. Once the Function(s) have been deployed in Azure, you may need to review and change the messaging endpoint for your bot. Your messaging endpoint can be found in the Azure Functions UI via the "Get function URL" link when you've selected the CycleShopBot Function.

  8. Test your bot via the Test in Web Chat feature.

  9. Enable any Channels you want the bot to be available on.

Having trouble? Log an issue here and I'll try to help.

Debugging

To learn how to debug Azure Bot Service bots, please visit https://aka.ms/bf-docs-azure-debug.

To debug locally, you'll need to configure your dev environment and run/debug the Azure function(s) locally. Then you can use the locally running bot by connecting the Bot Framework Emulator to the locally running bot Function.

About

Contributors

License

Licensed under the MIT License (MIT). See LICENSE for details.

About

Azure Bot Framework demo using LUIS, Bot Builder SDK, Dialogs, AdaptiveCards, and more

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published