!IMPORTANT This sample is for educational purposes only and is not recommended for production deployments.
One of the exciting features of the Copilot Chat App is its ability to store contextual information to memories and retrieve relevant information from memories to provide more meaningful answers to users through out the conversations.
Memories can be generated from conversations as well as imported from external sources, such as documents. Importing documents enables Copilot Chat to have up-to-date knowledge of specific contexts, such as enterprise and personal data.
http://localhost
Accounts in any organizational directory (Any Azure AD directory - Multitenant)
and personal Microsoft accounts (e.g. Skype, Xbox)
as the supported account
type for this sample.Application (client) ID
from your app registration.https://localhost:40443/
.Configure the appsettings.json file under this folder root with the following variables and fill
in with your information, where
ClientId
is the GUID copied from the Application (client) ID from your app registration in the Azure Portal,
RedirectUri
is the Redirect URI also from the app registration in the Azure Portal, and
ServiceUri
is the address the web api is running at.
ApiKey
is the API key to the service if there is one.
Run the following command to import a document to the app under the global document collection where all users will have access to:
dotnet run --files .\sample-docs\ms10k.txt
Or Run the following command to import a document to the app under a chat isolated document collection where only the chat session will have access to:
dotnet run --files .\sample-docs\ms10k.txt --chat-id [chatId]
Note that this will open a browser window for you to sign in to retrieve your user id to make sure you have access to the chat session.
Currently only supports txt and pdf files. A sample file is provided under ./sample-docs.
Importing may take some time to generate embeddings for each piece/chunk of a document.
To import multiple files, specify multiple files. For example:
dotnet run --files .\sample-docs\ms10k.txt .\sample-docs\Microsoft-Responsible-AI-Standard-v2-General-Requirements.pdf
Chat with the bot.
Examples:
With ms10k.txt:
With Microsoft Responsible AI Standard v2 General Requirements.pdf: