Skip to content

Latest commit

 

History

History
86 lines (62 loc) · 16.1 KB

SAMPLES.md

File metadata and controls

86 lines (62 loc) · 16.1 KB

Samples

Navigation


Important

If you plan to contribute to the package and develop locally, you can modify the sample projects to avoid dependency issues. Before running a sample in Teams Toolkit, modify the teamsapp.local.yml and remove the step to run npm install. The Teams AI repo uses Yarn instead and yarn install is run in the /js directory instead.

After completing the quickstart guide, the next step is to try out the samples.

Samples are E2E teams apps that are easy to set up locally. There are various samples to showcase the different features supported.

The following is a list of all the samples we support organized into four categories. If you are new to the library it is recommended to start with the basic samples.

When you are ready to dive into the AI Samples, try the fully conversational Teams Chef Bot sample that illustrates how to use Retrieval Augmentation Generation to ground the AI model’s answers in custom documents and datasets.

Basic Samples

These samples showcase basic functionalities to build message extensions and conversational bots.

Name Description Languages Supported
Echo bot Bot that echos back the users message. JS, C#, PY
Search Command Message Extension Message Extension to search NPM for a specific package and return the result as an Adaptive Card. JS, C#, PY
Type-Ahead Bot Bot that shows how to incorporate Adaptive Cards into the coversational flow. JS, C#, PY

AI Concepts

These samples showcase the AI features supported by the library. It builds on the basics of implementing conversational bots and message extensions.

Name Description Languages Supported
Twenty Questions Bot Bot that plays a game of twenty questions with the user. JS, C#, PY
AI Message Extensions Message Extension that leverages GPT models to help users generate and update posts. JS, C#, PY
Light Bot Bot that can switch the light on or off. It uses AI to map users message to predefined actions (or skills) JS, C#, PY
List Bot Bot that helps the user maintain task lists. It can add, remove, update, and search lists and tasks. JS, C#, PY
Llama Model Bot that exemplifies how users can create custom models for other LLMs. JS
Chat Moderation Bot Bot that shows how to incorporate content safety control when using AI features. JS, PY

AI Apps

Name Description Languages Supported
Teams Chef Bot Bot that helps the user build Teams apps by answering queries against external data source. JS
DevOps Bot Bot that helps the user perform DevOps actions such as create, update, triage and summarize work items. JS, PY
Card Gazer Bot Bot with AI vision support that is able to generate Adaptive Cards from uploaded images by using GPT vision models. JS
Math Tutor Bot Bot that is an expert in math. It uses OpenAI's Assisstants API. It uses the Code Interpretor tool. JS, C#, PY
Food Ordering Bot Bot that can take a food order for a fictional restaurant called The Pub. It uses the File Search and Function calling tools. JS, C#, PY
Advanced Samples The samples below combine advanced features such as AI, user authentication, basic conversational bot and message extension capabilities, resulting in their complexity.
Who Bot Bot that can tell you who your manager is, when's your next meeting...etc. It will authenticate that user, use AI to map user intents to actions in which it will call Graph to get specific user data. JS
Azure AI Search Q&A over your Azure AI Search data. JS
Azure AI Search Q&A over Azure data sources through Azure OpenAI on Your Data. JS

User Authentication Samples

Being able to access user specific data from other third party services is a cruicial capability of any Teams app. These samples showcase the different ways to authenticate a user to third party services such as Microsoft Graph.

There are two approaches to user authentication: OAuth and TeamsSSO.

The OAuth approach requires creating an OAuth connection in the Azure Bot service. It uses the Bot Framework's token service to handle the OAuth2.0 flow on behalf of the bot server.

The TeamsSSO approach implements the OAuth 2.0 protocol within the bot web server itself. It gives you more flexibility on how to configure Azure Active Directory (AAD), like using a client certificate. There is no need to create an OAuth connection in Azure Bot service.

Both of these approaches can be used to achieve the same functionality, such as using the SSO flow to authenticate the user.

Name Description Languages Supported
OAuth Bot User authentication in a conversational bot with the OAuth apporach. JS, C#, PY
OAuth Adaptive Card Bot User authentication in a conversational bot using ACv2 cards (Adaptive Cards v2) with the OAuth approach. JS
OAuth Message Extension User authentication in a message extension with the OAuth approach. JS, C#. PY
TeamsSSO Bot User authentication in a conversational bot using the TeamsSSO approach. JS, C#
TeamsSSO Message Extension User authentication in a message extension with the TeamsSSO approach. JS, C#