Markdown |
---|
# The CoPilot Teams Plugin The CoPilot Teams Plugin is a Microsoft Teams message extension responsible for querying Locator Rest Service for document data. ## Overview The CoPilot Teams Plugin is a Microsoft Teams message extension that is supposed to be used as CoPilot real- [Introduction](#introduction) - [How to Use the Personal Assistant](#how-to-use-the-personal-assistant) - [Inner Workings and Limitations of the Personal Assistant](#inner-workings-and-limitations-of-the-personal-assistant) # Introduction The Personal Assistant is a feature that leverages the capabilities of the ChatGPT model, allowing users to interact in a conversational manner about the content of selected search result documents. In this documentation, the term *prompt* (or *prompting*) is used. In the context of AI models, the term refers to user inputs, the questions asked or opinions expressed while interacting with the model. # How to Use the Personal Assistant The Personal Assistant can be accessed in these three ways: 1. **Directly**: One can access the Personal Assistant directly without first selecting any documents. Just click the Personal Assistant icon at the top of the search page and start prompting. 2. **After selecting documents**: Select one or more documents from the search result (use check box up in the left corner of any search result document) and press the *Open with Personal Assistant* button at the top of the search result list. 3. **From within the document preview window**: The preview window has a Personal Assistant tab that enables one to start prompting the model about the previewed document. # Inner Workings and Limitations of the Personal Assistant If possible, selected documents are normally uploaded in full. However, there is a model dependent size limit that may prevent the full documents from being uploaded to ChatGPT. If the amount of data exceeds the limit, the documents will be split up into text chunks and a vector search is performed to find the most relevant text chunks to upload relative the current prompt. In this situation, there will be an uneven performance depending of the type of prompt. Prompts about concrete items within the document(s) such as for instance "Please name everybody in management" will normally perform well, whereas generic prompts such as "what is the document about?" or "please provide a summary" will normally perform badlytime plugin. It's responsibility is to read document data from Locator database by handling the search query and return adaptive cards containing queried relevant documents data. ## Implementation and project history See *doc/architecture* for architecture decision log. ## Deployment During deployment following resources are created in azure: - Azure Entra App used to authenticate bot - Azure Entra App used to authenticate users - Azure Bot - Azure App Service - Azure App Service Plan ### Prerequisites - Active Azure Subscription, and resource group in this subscription - Installed `node.js` in version `18` with `npm` in version 9 ### Configuration - In `./env/env.dev` file update: - `AZURE_SUBSCRIPTION_ID` to ID of Azure subscription - `AZURE_RESOURCE_GROUP_NAME` to name of resource group in this subscription - `AYFIE_SEARCH_HOST` to URL to Rest Service on locator instance - Optionally change `AYFIE_SEARCH_HITS_COUNT` to desired maximum amount of document returned from Locator - Optionally change `AYFIE_VALIDATE_CERTIFICATE_AUTHORITY` to `true` if your Locator instance has installed certificate > If at any point you will be prompted with `Do you want to deploy resources in dev environment?` accept it by typing `y`. ### Using teamsfx-cli package - Install teamsfx-cli using this command: ``` npm install -g @microsoft/teamsfx-cli ``` - Provision app using this command from main directory of this project: ``` teamsfx provision --env=dev ``` You will be promted to log in to Microsoft 365 account as well as Aure Account (make sure to login using account that have access to subscription and resource group where application will be deployed). Also you will be warned that some cost may incur according to the usage, you need to accept this warning by typing `yes`. - Give admin consent to resources in newly created Azure Entra Id App. `Object Id` and `Client Id` of this app can be found in `\env\.env.dev` under `AAD_APP_OBJECT_ID` and `AAD_APP_CLIENT_ID` variables. - Deploy app using this command from main directory of this project: ``` teamsfx deploy --env=dev ``` - Publish app using this command from main directory of this project: ``` teamsfx publish --env=dev ``` - Approve the app in Teams Admin Center (https://admin.teams.microsoft.com/policies/manage-apps) as administator. ### Using Teams Toolkit extension in Visual Studio Code - Install Teams Toolkit extension in Visual Studio Code - In left hand side menu choose Teams Toolkit - In `Account` section login to Microsoft 365 and Microsoft Azure (make sure to login using account that have access to subscription and resource group where application will be deployed) - In `Lifecycle` section trigger `Provision` - Give admin consent to resources in newly created Azure Entra Id App. `Object Id` and `Client Id` of this app can be found in `\env\.env.dev` under `AAD_APP_OBJECT_ID` and `AAD_APP_CLIENT_ID` variables. - In `Lifecycle` section trigger `Deploy` - In `Lifecycle` section trigger `Publish` - Approve the app in Teams Admin Center (https://admin.teams.microsoft.com/policies/manage-apps) as administator. ### Locator configuration - Start saga with `-Configuration` parameter: ``` .\saga.p1 -Configuration ``` - Once configuration menu shows up go to `Advanced > Microsoft Entra Authentication` - Value of `AYFIE_SAGA_ENTRA_ID_CLIENT_ID` can be found in `./env/.env.dev` under `AAD_APP_CLIENT_ID`. - Value of `AYFIE_SAGA_ENTRA_ID_CLIENT_SECRET` is encrypted in `./env/.env.dev.user` under `SECRET_AAD_APP_CLIENT_SECRET` but decrypted value is required. - If you have installed `Teams Toolkit extension in Visual Studio Code` you can decrypt it and use it. - If you dont have it installed you can create new client secret in Azure Entra Id App. `Object Id` and `Client Id` of this app can be found in `\env\.env.dev` under `AAD_APP_OBJECT_ID` and `AAD_APP_CLIENT_ID` variables. - Value of `AYFIE_SAGA_ENTRA_ID_TENANT_ID` can be found in `./env/.env.dev` under `AAD_APP_TENANT_ID`. |
Page Comparison
General
Content
Integrations