From b45db5123034f4fe57b69153bbb430013d0cce8d Mon Sep 17 00:00:00 2001 From: Gil LaHaye Date: Tue, 31 Oct 2023 12:38:17 -0400 Subject: [PATCH] Fix condition to skip building frontend (#561) and replace "Copilot Chat" with "Chat Copilot" to test it ### Motivation and Context Save time by not building the frontend files when we only are doing a PR for backend files ### Description Remove the "=" that was messing up the boolean evaluation. Replace a bunch of "Copilot Chat" strings with "Chat Copilot" to verify fix. ### Contribution Checklist - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [Contribution Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible --- .github/workflows/copilot-build-backend.yml | 2 +- webapi/Extensions/SemanticKernelExtensions.cs | 2 +- webapi/Extensions/ServiceExtensions.cs | 2 +- webapi/Models/Response/ChatArchive.cs | 2 +- webapi/Program.cs | 2 +- webapi/README.md | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/copilot-build-backend.yml b/.github/workflows/copilot-build-backend.yml index f6f4b9be6..8cb5efb1b 100644 --- a/.github/workflows/copilot-build-backend.yml +++ b/.github/workflows/copilot-build-backend.yml @@ -57,7 +57,7 @@ jobs: - name: Package Copilot Chat WebAPI run: | - scripts\deploy\package-webapi.ps1 -Configuration Release -DotnetFramework net6.0 -TargetRuntime win-x64 -OutputDirectory ${{ github.workspace }}\scripts\deploy -Version ${{ steps.versiontag.outputs.versiontag }} -InformationalVersion "Built from commit ${{ steps.gitversion.outputs.ShortSha }} on $(Get-Date -Format 'yyyy-MM-dd')" -SkipFrontendFiles=${{ github.event_name == 'pull_request' }} + scripts\deploy\package-webapi.ps1 -Configuration Release -DotnetFramework net6.0 -TargetRuntime win-x64 -OutputDirectory ${{ github.workspace }}\scripts\deploy -Version ${{ steps.versiontag.outputs.versiontag }} -InformationalVersion "Built from commit ${{ steps.gitversion.outputs.ShortSha }} on $(Get-Date -Format 'yyyy-MM-dd')" -SkipFrontendFiles ('${{ github.event_name == 'pull_request' }}' -eq 'true') - name: Upload package to artifacts uses: actions/upload-artifact@v3 diff --git a/webapi/Extensions/SemanticKernelExtensions.cs b/webapi/Extensions/SemanticKernelExtensions.cs index f5c54232e..63c2e2d7d 100644 --- a/webapi/Extensions/SemanticKernelExtensions.cs +++ b/webapi/Extensions/SemanticKernelExtensions.cs @@ -177,7 +177,7 @@ private static void InitializeKernelProvider(this WebApplicationBuilder builder) /// private static Task RegisterChatCopilotSkillsAsync(IServiceProvider sp, IKernel kernel) { - // Copilot chat skills + // Chat Copilot skills kernel.RegisterChatSkill(sp); // Time skill diff --git a/webapi/Extensions/ServiceExtensions.cs b/webapi/Extensions/ServiceExtensions.cs index 61cc70a79..f679fe384 100644 --- a/webapi/Extensions/ServiceExtensions.cs +++ b/webapi/Extensions/ServiceExtensions.cs @@ -27,7 +27,7 @@ namespace CopilotChat.WebApi.Extensions; /// /// Extension methods for . -/// Add options and services for Copilot Chat. +/// Add options and services for Chat Copilot. /// public static class CopilotChatServiceExtensions { diff --git a/webapi/Models/Response/ChatArchive.cs b/webapi/Models/Response/ChatArchive.cs index 36ba186b2..b7705c9fc 100644 --- a/webapi/Models/Response/ChatArchive.cs +++ b/webapi/Models/Response/ChatArchive.cs @@ -43,7 +43,7 @@ public class ChatArchive public Dictionary> Embeddings { get; set; } = new Dictionary>(); /// - /// The embeddings of uploaded documents in Copilot Chat. It represents the document memory which is accessible to all chat sessions of a given user. + /// The embeddings of uploaded documents in Chat Copilot. It represents the document memory which is accessible to all chat sessions of a given user. /// public Dictionary> DocumentEmbeddings { get; set; } = new Dictionary>(); } diff --git a/webapi/Program.cs b/webapi/Program.cs index 1d4231d63..0d2406ca7 100644 --- a/webapi/Program.cs +++ b/webapi/Program.cs @@ -21,7 +21,7 @@ namespace CopilotChat.WebApi; /// -/// Copilot Chat Service +/// Chat Copilot Service /// public sealed class Program { diff --git a/webapi/README.md b/webapi/README.md index b5f1d3efd..61974e2ca 100644 --- a/webapi/README.md +++ b/webapi/README.md @@ -100,7 +100,7 @@ To enable sequential planner, return new SequentialPlanner(this.Kernel, new SequentialPlannerConfig { RelevancyThreshold = 0.75 }).CreatePlanAsync(goal); ``` \* The `RelevancyThreshold` is a number from 0 to 1 that represents how similar a goal is to a function's name/description/inputs. You want to tune that value when using SequentialPlanner to help keep things scoped while not missing on on things that are relevant or including too many things that really aren't. `0.75` is an arbitrary threshold and we recommend developers play around with this number to see what best fits their scenarios. -1. Restart the `webapi` - Copilot Chat should be now running locally with SequentialPlanner. +1. Restart the `webapi` - Chat Copilot should be now running locally with SequentialPlanner. ## (Optional) Enabling Cosmos Chat Store. @@ -125,7 +125,7 @@ In an effort to optimize performance, each container must be created with a spec By default, the service uses an in-memory volatile memory store that, when the service stops or restarts, forgets all memories. [Qdrant](https://github.com/qdrant/qdrant) is a persistent scalable vector search engine that can be deployed locally in a container or [at-scale in the cloud](https://github.com/Azure-Samples/qdrant-azure). -To enable the Qdrant memory store, you must first deploy Qdrant locally and then configure the Copilot Chat API service to use it. +To enable the Qdrant memory store, you must first deploy Qdrant locally and then configure the Chat Copilot API service to use it. ### 1. Configure your environment @@ -153,7 +153,7 @@ Before you get started, make sure you have the following additional requirements ## (Optional) Enabling the Azure Cognitive Search Memory Store -Azure Cognitive Search can be used as a persistent memory store for Copilot Chat. +Azure Cognitive Search can be used as a persistent memory store for Chat Copilot. The service uses its [vector search](https://learn.microsoft.com/en-us/azure/search/vector-search-overview) capabilities. ## (Optional) Enable Application Insights telemetry