Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

chat-copilot

> 编程语言
Open source

NOTE: This is a sample application to help you understand how Semantic Kernel and AI can work in Web Applications. This sample is NOT FOR P…

2.4K stars0 likes0 views
WebsiteGitHub

About

NOTE: This is a sample application to help you understand how Semantic Kernel and AI can work in Web Applications. This sample is NOT FOR P…

NOTE: This is a sample application to help you understand how Semantic Kernel and AI can work in Web Applications. This sample is NOT FOR PRODUCTION deployments.

Chat Copilot Sample Application

This sample allows you to build your own integrated large language model (LLM) chat copilot. The sample is built on Microsoft Semantic Kernel and has three components:

  1. A frontend application React web app
  2. A backend REST API .NET web API service
  3. A .NET worker service for processing semantic memory.

These quick-start instructions run the sample locally. They can also be found on the official Chat Copilot Microsoft Learn documentation page for getting started.

To deploy the sample to Azure, please view Deploying Chat Copilot after meeting the requirements described below.

IMPORTANT: This sample is for educational purposes only and is not recommended for production deployments.

IMPORTANT: Each chat interaction will call Azure OpenAI/OpenAI which will use tokens that you may be billed for.

Requirements

You will need the following items to run the sample:

  • .NET 8.0 SDK (via Setup install.* script)
  • Node.js (via Setup install.* script)
  • Yarn (via Setup install.* script)
  • Git
  • AI Service (one of the following is required)
AI Service Requirement
Azure OpenAI - Access
- Resource
- Deployed models (gpt-4o and text-embedding-ada-002)
- Endpoint
- API key
OpenAI - Account
- API key

Instructions

Windows

  1. Open PowerShell as an administrator.

    NOTE: Ensure that you have PowerShell Core 6+ installed. This is different from the default PowerShell installed on Windows.

  2. Clone this repository

    git clone https://github.com/microsoft/chat-copilot
    
  3. Setup your environment.

    The following is a script to help you install the dependencies required. Feel free to install dotnet, nodejs, and yarn with your method of choice or use this script.

    cd <path to chat-copilot>\scripts\
    .\Install.ps1
    

    NOTE: This script will install Chocolatey, dotnet-8.0-sdk, nodejs, and yarn.

    NOTE: If you receive an error that the script is not digitally signed or cannot execute on the system, you may need to change the execution policy (see list of policies and scopes) or unblock the script.

  4. Configure Chat Copilot.

    .\Configure.ps1 -AIService {AI_SERVICE} -APIKey {API_KEY} -Endpoint {AZURE_OPENAI_ENDPOINT}
    
    • AI_SERVICE: AzureOpenAI or OpenAI.

    • API_KEY: The API key for Azure OpenAI or for OpenAI.

    • AZURE_OPENAI_ENDPOINT: The Azure OpenAI resource Endpoint address. This is only required when using Azure OpenAI, omit -Endpoint if using OpenAI.

    • IMPORTANT: For AzureOpenAI, if you deployed models gpt-4o and text-embedding-ada-002 with custom names (instead of the default names), also use the parameters:

      -CompletionModel {DEPLOYMENT_NAME} -EmbeddingModel {DEPLOYMENT_NAME}
      

      Open the .\Configure.ps1 script to see all of the available parameters.

  5. Run Chat Copilot locally. This step starts both the backend API and frontend application.

    .\Start.ps1
    

    It may take a few minutes for Yarn packages to install on the first run.

    NOTE: Confirm pop-ups are not blocked and you are logged in with the same account used to register the application.

    • (Optional) To start ONLY the backend:

      .\Start-Backend.ps1
      

Linux/macOS

  1. Open Bash as an Administrator.

  2. Clone this repository

    git clone https://github.com/microsoft/chat-copilot
    
  3. Configure environment.

    The following is a script to help you install the dependencies required. Feel free to install dotnet, nodejs, and yarn with your method of choice or use this script.

    cd <path to chat-copilot>/scripts/
    

    Ubuntu/Debian Linux

    ./install-apt.sh
    

    NOTE: This script uses apt to install dotnet-sdk-8.0, nodejs, and yarn.

    macOS

    ./install-brew.sh
    

    NOTE: This script uses homebrew to install dotnet-sdk, nodejs, and yarn.

  4. Configure Chat Copilot.

    1. For OpenAI

      ./configure.sh --aiservice OpenAI --apikey {API_KEY}
      
      • API_KEY: The API key for OpenAI.
    2. For Azure OpenAI

      ./configure.sh --aiservice AzureOpenAI \
                     --endpoint {AZURE_OPENAI_ENDPOINT} \
                     --apikey   {API_KEY}
      
      • AZURE_OPENAI_ENDPOINT: The Azure OpenAI resource Endpoint address.
      • API_KEY: The API key for Azure OpenAI.

      IMPORTANT: If you deployed models gpt-4o and text-embedding-ada-002 with custom names (instead of the default names), you need to specify the deployment names with three additional parameters:

      ./configure.sh --aiservice AzureOpenAI \
                     --endpoint        {AZURE_OPENAI_ENDPOINT} \
                     --apikey          {API_KEY} \
                     --completionmodel {DEPLOYMENT_NAME} \
                     --embeddingmodel  {DEPLOYMENT_NAME}
      
  5. Run Chat Copilot locally. This step starts both the backend API and frontend application.

    ./start.sh
    

    It may take a few minutes for Yarn packages to install on the first run.

    NOTE: Confirm pop-ups are not blocked and you are logged in with the same account used to register the application.

    • (Optional) To start ONLY the backend:

      ./start-backend.sh
      

(Optional) Run the memory pipeline

By default, the webapi is configured to work without the memory pipeline for synchronous processing documents. To enable asynchronous document processing, you need to configure the webapi and the memory pipeline. Please refer to the webapi README and the memory pipeline README for more information.

(Optional) Enable backend authentication via Azure AD

By default, Chat Copilot runs locally without authentication, using a guest user profile. If you want to enable authentication with Azure Active Directory, follow the steps below.

Requirements

  • Azure account
  • Azure AD Tenant

Instructions

  1. Create an application registration for the frontend web app, using the values below

    • Supported account types: "Accounts in this organizational directory only ({YOUR TENANT} only - Single tenant)"
    • Redirect URI (optional): Single-page application (SPA) and use http://localhost:3000.
  2. Create a second application registration for the backend web api, using the values below:

    • Supported account types: "Accounts in this organizational directory only ({YOUR TENANT} only - Single tenant)"
    • Do not configure a Redirect URI (optional)

NOTE: Other account types can be used to allow multitenant and personal Microsoft accounts to use your application if you desire. Doing so may result in more users and therefore higher costs.

Take note of the Application (client) ID for both app registrations as you will need them in future steps.

  1. Expose an API within the second app registration

    1. Select Expose an API from the menu

    2. Add an Application ID URI

      1. This will generate an api:// URI

      2. Click Save to store the generated URI

    3. Add a scope for access_as_user

      1. Click Add scope

      2. Set Scope name to access_as_user

      3. Set Who can consent to Admins and users

      4. Set Admin consent display name and User consent display name to Access copilot chat as a user

      5. Set Admin consent description and User consent description to Allows the accesses to the Copilot chat web API as a user

    4. Add the web app frontend as an authorized client application

      1. Click Add a client application

      2. For Client ID, enter the frontend's application (client) ID

      3. Check the checkbox under Authorized scopes

      4. Click Add application

  2. Add permissions to web

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言