Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 3.17 KB

deploy-to-azure.md

File metadata and controls

52 lines (34 loc) · 3.17 KB

Using Teams Toolkit for Visual Studio Code (Recommended)

Additional Prerequisites

Setting up the Teams Copilot Starter Project

  1. Prepare the Environment

    Teams Copilot Starter app requires Azure OpenAI service. Before deploying to Azure, configure Azure OpenAI related variables in your .env file. Create your Azure OpenAI resource on azure portal and deploy completion and embedding models on that Azure OpenAI resource.

    OPENAI_KEY=<OpenAI Key>
    OPENAI_ENDPOINT=<OpenAI Endpoint>
    OPENAI_MODEL=<completetion model>
    OPENAI_EMBEDDING_MODEL=<embedding model>
  2. Open Teams Toolkit in Visual Studio Code, and sign in your Azure account by clicking the Sign in to Azure in the ACCOUNTS section from sidebar.

  3. After you signed in, select a subscription under your account. The Teams Toolkit will use this subscription to provision Azure resources to host you app.

  4. Run the teamsapp provision command to trigger the provision stage.

    teamsapp provision --env dev

Note: Provision Azure cloud resources and deploy to Azure may cause charges to your Azure Subscription.

After the Teams Copilot Starter has been deployed to Azure, the development/test and production environment architecture may look like in the following diagram: Architecture

  • In the development environment, the user accesses Teams Copilot Starter application, which is registered under the M365 Tenant. The copilot bot is registered to dev.botframework.com and token.botframework.com for authentication tokens. Azure blobStorage is used for storing chat history. Azure OpenAI chat completion and Azure OpenAI Embeddings are used for generation of prompts and semantic search to query a knowledge base for relevant documents.
  • In the Production Environment, the user accesses Teams Copilot Starter application, which is registered under the M365 Tenant. The Bot is configured with a token obtained from token.botframework.com for authentication. Within the Azure Subscription AzureOpenAI, App Insights, and Azure blob storage are used for OpenAI API calls, monitoring and storing chat history.
  1. Run the teamsapp deploy command to trigger deploy stage.

    teamsapp deploy --env dev
  2. Run the teamsapp publish command to trigger publish stage.

    teamsapp publish --env dev

Once Teams Copilot Starter app has been published, the app becomes accessible within Microsoft Teams admin center under Teams app -> Manage app. From here, Teams administrators can review and approve the app for enterprise users.