This sample app demonstrates how to use a Microsoft Teams bot to chat with your data using natural language in the flow of work.
It builds on top of the Azure GPT-RAG sample which demonstrates how to create ChatGPT-like experiences over your own data using the Retrieval Augmented Generation pattern with Azure OpenAI Service to access a GPT model (gpt-4o), and Azure AI Search for data indexing and retrieval.
This sample is built upon the work in the Microsoft Teams Development Community Samples, specifically the bot-azure-search-openai-ts sample.
You can run this sample locally using a simulated Microsoft 365 tenant, however if you wish to run the sample against live resources, you will need:
- Microsoft 365 tenant with sideloading enabled
- Azure subscription
| Version | Date | Author | Comments |
|---|---|---|---|
| 1.2.1 | December 18, 2024 | Matthew Housholder | Converted integration to GPT-RAG APIs |
| 1.2 | May 24, 2024 | Garry Trinder | Updated prerequisites |
| 1.1 | April 2, 2024 | Garry Trinder | Updated instructions |
| 1.0 | March 27, 2024 | Garry Trinder | Initial release |
THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
First, prepare the project:
- Clone or fork this repo locally
- Open the sample project folder in Visual Studio Code
- In the
env/samplesfolder, copy the sample files to the parent folderenv - In the
envfolder, rename all files removing.samplefrom the name
Then, choose a path to run the app:
- Run against a simulated Microsoft 365 tenant and bot service, use this approach if you don't have access to a Microsoft 365 tenant, are unable to use a Dev Tunnel, are unable to sideload apps into your tenant,are unable provision Microsoft Entra ID or Bot Framework resources required to create a bot or deploy Azure resources. Teams App Test Tool is used to simulate the Microsoft Teams user interface and LLM responses are mocked using Dev Proxy.
- Run locally against a real Microsoft 365 tenant, use this approach if you have access to a Microsoft 365 tenant with sideloading enabled, can use a Dev Tunnel, can provision Microsoft Entra ID or Bot Framework resources required to create a bot and can deploy Azure resources.
- Deploy and run from Azure, use this when you want to provision resources and deploy the bot code to Azure and publish the app to the Microsoft Teams organisation app catalog.
- Install Dev Proxy on your local machine
- Open a terminal in the root project folder
- Execute
devproxy --config-file devProxy/use-mocks.jsonto start Dev Proxy - Open the side bar in VS Code, select the
Run and Debugpanel - In the debug profile dropdown, select
Debug in Test Tool - Press F5 to launch the Test Tool
- In the
Welcomemessage, select the first action button
- Follow the steps to deploy the Azure GPT-RAG sample to an Azure subscription.
- Open the repo folder in Visual Studio Code.
- In
.env.local, updateAPP_BACKEND_ENDPOINTvariable with the URL to your provisioned frontend/backend
- In
.env.dev, updateAPP_BACKEND_ENDPOINTvariable with the URL to your provisioned frontend/backend - On the side bar, select the
Teams Toolkiticon - In the
Lifecyclesection, selectProvisionand follow steps to provision resources in Azure. - In the
Lifecyclesection, selectDeployand follow steps to build and deploy app code to Azure. - In the
Lifecyclesection, selectPublishto publish to and approve the app in your Microsoft Teams organizational store.
The following resources will be deployed to Azure:
- Azure App Service Plan (B1)
- Azure Bot Service (Free)
- Microsoft Entra ID App Reg
- Azure Storage Account
Warning
The Azure App Service (B1) and Azure Storage Account resources incur a monthly cost. You should delete these resources when you no longer need them.
- Question and answer with your data
- Welcome message with example questions
- Citations
- Follow-up questions as suggested actions
