Welcome to the Bot Framework samples repository. Here you will find task-focused samples in C#, JavaScript and TypeScript to help you get started with the Bot Framework SDK!
Перейти к файлу
johnataylor 54c1ac2d13
Merge pull request #1385 from Microsoft/cleemullins-patch-1
Update Readme to reflect in-progress changes
2019-04-08 15:18:21 -07:00
.github issue template updates to get in parity with the botbuilder repos (#496) 2018-09-22 15:12:44 -07:00
experimental Qnamaker support bot Sample (#1335) 2019-03-30 15:21:51 -07:00
generators Fixes 1246, EmptyBot missing appID and appPassword from Adapter constructor (#1249) 2019-02-16 14:54:07 -08:00
samples [JS Sample 15] Fix for image attachments (#1323) 2019-03-13 14:28:04 -07:00
.editorconfig Updated .editorConfig for JS/TS files. Settings taken from the VSCode (#394) 2018-09-16 15:40:09 -07:00
.gitattributes Added basic config for the repo, using the files from our C# repo (which 2018-09-10 11:14:16 -07:00
.gitignore yeoman chalk (#1111) 2018-12-28 15:08:39 -08:00
CONTRIBUTING.md yeoman cse work (#962) 2018-11-25 09:31:17 -08:00
INSTALLING_CLI_TOOLS.md echo sample name changes for csharp .net core and webapi (#964) 2018-11-25 14:36:39 -08:00
LICENSE.md update license information (#565) 2018-09-27 11:02:24 -07:00
README.md Update Readme to reflect in-progress changes 2019-04-08 15:15:02 -07:00
SPEC.md Minor improvements to Readme template in SPEC.md (#801) 2018-10-29 10:39:17 -07:00

README.md

Sample updates in progress!

We are iterating on all C# and JS samples in the "Samples Work in Progress" branch. This branch will be merged into master towards the end of April. The key work involves:

  1. Migrating the C# Samples to the MVC Pattern with common DI usage and Startup cleanup.
  2. Removal of .bot files from all samples, and the addition of ARM templates.
  3. Code cleanup across the JS samples.
  4. Strong push towards more modular design and code re-use as part of the samples.
  5. Close alignment of docs and samples.
  6. Improvements to how dialogs are implemented and explained.
  7. Updates to all the generators (VSIX, dotnet, and Yeoman)

Until this work is merged, Pull Requests to master will not be taken.

Overview

This repository contains samples for the Microsoft Bot Builder V4 SDK - dotnet SDK, JS SDK.

Samples for the Bot Builder V3 SDK are available here.

Resources

Bot Builder provides the most comprehensive experience for building conversation applications and includes the following SDKs and tools:

Please see here for an overview of the end-to-end bot development workflow. To get started, you can create a bot with Azure Bot Service. Click here if you need a trial Azure subscription.

Samples list

Samples are organized per platform and are numbered to provide a suggested reading order.

To use the samples clone this GitHub repository using Git.

    git clone https://github.com/Microsoft/BotBuilder-Samples.git
    cd BotBuilder-Samples

🏃 - Indicates planned and work in progress.

Sample Name Description .NET CORE Node.js .NET Web API JS (es6) Typescript
1.console-echo Introduces the concept of adapter and demonstrates a simple echo bot on console adapter and how to send a reply and access the incoming message. View View View
1.a.browser-echo Introduces browser adapter View
2.a.echobot Demonstrates how to receive and send messages. View View 🏃 View
2.b.echo-with-counter Demonstrates how to use state. Shows commented out code for all natively supported storage providers. Storage providers should include InMemory and Blob storage. View View View View
3.welcome-user Introduces activity types and provides a welcome message on conversation update activity. View View
4.simple-prompt Demonstrates prompt pattern by prompting user for a property. Introduces user state .vs. conversation state. Ask for name and prints back that information. Uses sequence dialogs if available or default option is to use waterfall dialogs View View
5.multi-turn-prompt Demonstrates more complex pattern by prompting user for multiple properties. Ask for name, age and prints back that information. Uses sequence dialogs if available or default option is to use waterfall dialogs. View View
6.using-cards Introduces all card types including thumbnail, audio, media etc. Builds on Welcoming user + multi-prompt bot by presenting a card with buttons in welcome message that route to appropriate dialog. View View
7.using-adaptive-cards Introduces adaptive cards - demonstrates how the multi-turn dialog can be augmented to also use a card to get user input for name and age. View View
8.suggested-actions Demonstrates how to use suggested actions View View
9.message-routing Demonstrates the main dialog or root dispatcher paradigm. Needs to show how to handle interruptions like cancel, help. View View
10.prompt-validations Demonstrates how to take advantage of different prompt types and prompt validators. View View
11.qnamaker Demonstrates how to use QnA Maker to have simple single-turn conversations View View View View
12.nlp-with-luis Demonstrates how to use LUIS to understand natural language View View View View
13.basic-bot Basic bot template that puts together cards, NLP (LUIS) View View View View
14.nlp-with-dispatch Demonstrates how to dispatch across LUIS, QnA Maker View View
15.handling-attachments Demonstrates how to listen for/handle user provided attachments View View
16.proactive-messages Demonstrates how to send proactive messages to users View View
17.multilingual-bot Using translate middleware to support a multi-lingual bot. Demonstrates custom middleware. View View
18.bot-authentication Bot that demonstrates how to integration with OAuth providers View View
19.custom-dialogs Demonstrates different ways to model conversations. Waterfall .vs. using your own dialog management View View
20.qna-with-appinsights Demonstrates how to use QnA Maker and Azure Application insights View View
21.luis-appinsights Demonstrates how to use LUIS and Azure Application insights View View
22.conversation-history Demonstrates the use of SendConversationHistoryAsync API to upload conversation history stored in the conversation Transcript. View 🏃
23.facebook-events Integrate and consume Facebook specific payloads, such as post-backs, quick replies and opt-in events. View View
24.bot-auth-msgraph Demonstrates bot authentication capabilities of Azure Bot Service. Demonstrates utilizing the Microsoft Graph API to retrieve data about the user. View View
25.bot-logging This bot demonstrates the logging middleware in the Node.js SDK View
26.bot-transcript-logging This bot demonstrates the transcript logging middleware in the Node.js SDK View
30.asp-mvc-bot Demonstrates how to build a bot as an ASP.NET MVC Controller View
40.timex-resolution Demonstrates various ways to parse and manipulate the TIMEX expressions you get from LUIS and the DateTimeRecognizer used by the DateTimePrompt. View View
42.scaleout Demonstrates how you can build your own state solution from the ground up that supports scaled out deployment with ETag based optimistic locking. View 🏃
50.diceroller-skill This sample demonstrates how to implement a Cortana Skill that properly handles EndOfConversation events. View
51.cafe-bot A complete E2E Cafe bot that has all capabilities and includes best practices View View
52.enterprise-bot Enterprise bot that demonstrates use of Dialogs, Template Manager, Dispatch across different services and implementing custom middleware. View View
70.styling-webchat This sample shows how to create a web page with custom Web Chat component. View

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Reporting Security Issues

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) at secure@microsoft.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.