diff --git a/.vscode/launch.json b/.vscode/launch.json index 256a519ad3..79745670d1 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,12 +2,12 @@ "version": "0.2.0", "configurations": [ { - "name": ".NET Core Launch (CopilotChatApi)", + "name": ".NET Core Launch (CopilotChatWebApi)", "type": "coreclr", "request": "launch", - "preLaunchTask": "build (CopilotChatApi)", + "preLaunchTask": "build (CopilotChatWebApi)", // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/samples/apps/copilot-chat-app/webapi/bin/Debug/net6.0/CopilotChatApi.dll", + "program": "${workspaceFolder}/samples/apps/copilot-chat-app/webapi/bin/Debug/net6.0/CopilotChatWebApi.dll", "args": [], "cwd": "${workspaceFolder}/samples/apps/copilot-chat-app/webapi", // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 00bf7e1614..9f21b2cab0 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -230,7 +230,7 @@ "label": "run (Copilot Chat)", "detail": "Run all copilot chat components", "group": "test", - "dependsOn": ["run (CopilotChatApi)", "run (CopilotChatApp)"], + "dependsOn": ["run (CopilotChatWebApi)", "run (CopilotChatApp)"], "dependsOrder": "parallel" }, // Copilot Setup @@ -256,51 +256,19 @@ "label": "setup (Copilot Chat)", "detail": "Setup (like setting secrets) for copilot chat app and api", "group": "test", - "dependsOn": [ - "GetSecret (Completion:Key)", - "GetSecret (Embedding:Key)", - "GetSecret (Planner:Key)" - ], + "dependsOn": ["GetSecret (AIService:Key)"], "dependsOrder": "sequence" // TODO -- add tasks for configuring environment variables }, { - "label": "GetSecret (Completion:Key)", + "label": "GetSecret (AIService:Key)", "command": "dotnet", "type": "process", "args": [ "user-secrets", "set", - "Completion:Key", - "${input:completionSecret}" - ], - "options": { - "cwd": "${workspaceFolder}/samples/apps/copilot-chat-app/webapi" - } - }, - { - "label": "GetSecret (Embedding:Key)", - "command": "dotnet", - "type": "process", - "args": [ - "user-secrets", - "set", - "Embedding:Key", - "${input:embeddingSecret}" - ], - "options": { - "cwd": "${workspaceFolder}/samples/apps/copilot-chat-app/webapi" - } - }, - { - "label": "GetSecret (Planner:Key)", - "command": "dotnet", - "type": "process", - "args": [ - "user-secrets", - "set", - "Planner:AIService:Key", - "${input:plannerSecret}" + "AIService:Key", + "${input:aiServiceSecret}" ], "options": { "cwd": "${workspaceFolder}/samples/apps/copilot-chat-app/webapi" @@ -339,12 +307,12 @@ }, // Copilot Chat Api { - "label": "build (CopilotChatApi)", + "label": "build (CopilotChatWebApi)", "command": "dotnet", "type": "process", "args": [ "build", - "${workspaceFolder}/samples/apps/copilot-chat-app/webapi/CopilotChatApi.csproj", + "${workspaceFolder}/samples/apps/copilot-chat-app/webapi/CopilotChatWebApi.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary", "/property:DebugType=portable" @@ -353,13 +321,13 @@ "group": "build" }, { - "label": "run (CopilotChatApi)", + "label": "run (CopilotChatWebApi)", "command": "dotnet", "type": "process", "args": [ "run", "--project", - "${workspaceFolder}/samples/apps/copilot-chat-app/webapi/CopilotChatApi.csproj" + "${workspaceFolder}/samples/apps/copilot-chat-app/webapi/CopilotChatWebApi.csproj" ], "problemMatcher": "$msCompile", "group": "test", @@ -370,14 +338,14 @@ } }, { - "label": "watch (CopilotChatApi)", + "label": "watch (CopilotChatWebApi)", "command": "dotnet", "type": "process", "args": [ "watch", "run", "--project", - "${workspaceFolder}/samples/apps/copilot-chat-app/webapi/CopilotChatApi.csproj" + "${workspaceFolder}/samples/apps/copilot-chat-app/webapi/CopilotChatWebApi.csproj" ], "problemMatcher": "$msCompile", "group": "build" @@ -500,24 +468,10 @@ "description": "Enter a filter for the tests" }, { - "id": "completionSecret", + "id": "aiServiceSecret", "type": "promptString", "default": "", - "description": "Enter a secret for completion", - "password": true - }, - { - "id": "embeddingSecret", - "type": "promptString", - "default": "", - "description": "Enter a secret for embedding", - "password": true - }, - { - "id": "plannerSecret", - "type": "promptString", - "default": "", - "description": "Enter a secret for planner", + "description": "Enter a secret for Copilot Chat AIService:Key", "password": true } ] diff --git a/samples/apps/copilot-chat-app/.vscode/tasks.json b/samples/apps/copilot-chat-app/.vscode/tasks.json index 97f16341f5..45d576208f 100644 --- a/samples/apps/copilot-chat-app/.vscode/tasks.json +++ b/samples/apps/copilot-chat-app/.vscode/tasks.json @@ -1,162 +1,134 @@ { - "version": "2.0.0", - "tasks": [ - // Copilot Chat - { - "label": "run (Copilot Chat)", - "detail": "Run all copilot chat components", - "group": "test", - "dependsOn": ["run (CopilotChatApi)", "run (CopilotChatApp)"], - "dependsOrder": "parallel" - }, - // Copilot Setup - { - "label": "install (CopilotChatApp)", - "detail": "Install all copilot chat app dependencies", - "type": "shell", - "group": "build", - "command": "yarn", - "presentation": { - "echo": true, - "reveal": "always", - "showReuseMessage": false, - "panel": "shared", - "group": "buildTasks" - }, - "options": { - "cwd": "${workspaceFolder}/samples/apps/copilot-chat-app/webapp" - }, - "problemMatcher": [] - }, - { - "label": "setup (Copilot Chat)", - "detail": "Setup (like setting secrets) for copilot chat app and api", - "group": "test", - "dependsOn": ["GetSecret (Completion:Key)", "GetSecret (Embedding:Key)", "GetSecret (Planner:Key)"], - "dependsOrder": "sequence" - // TODO -- add tasks for configuring environment variables - }, - { - "label": "GetSecret (Completion:Key)", - "command": "dotnet", - "type": "process", - "args": ["user-secrets", "set", "Completion:Key", "${input:completionSecret}"], - "options": { - "cwd": "${workspaceFolder}/samples/apps/copilot-chat-app/webapi" - } - }, - { - "label": "GetSecret (Embedding:Key)", - "command": "dotnet", - "type": "process", - "args": ["user-secrets", "set", "Embedding:Key", "${input:embeddingSecret}"], - "options": { - "cwd": "${workspaceFolder}/samples/apps/copilot-chat-app/webapi" - } - }, - { - "label": "GetSecret (Planner:Key)", - "command": "dotnet", - "type": "process", - "args": ["user-secrets", "set", "Planner:AIService:Key", "${input:plannerSecret}"], - "options": { - "cwd": "${workspaceFolder}/samples/apps/copilot-chat-app/webapi" - } - }, - // Copilot Chat App - { - "label": "build (CopilotChatApp)", - "type": "shell", - "group": "build", - "command": "yarn build", - "presentation": { - "echo": true, - "reveal": "always", - "panel": "shared", - "group": "buildTasks" - }, - "options": { - "cwd": "${workspaceFolder}/samples/apps/copilot-chat-app/webapp" - }, - "problemMatcher": [] - }, - { - "label": "run (CopilotChatApp)", - "type": "shell", - "group": "test", - "command": "yarn start", - "presentation": { - "reveal": "always", - "panel": "shared", - "group": "copilot" - }, - "options": { - "cwd": "${workspaceFolder}/samples/apps/copilot-chat-app/webapp" - } - }, - // Copilot Chat Api - { - "label": "build (CopilotChatApi)", - "command": "dotnet", - "type": "process", - "args": [ - "build", - "${workspaceFolder}/samples/apps/copilot-chat-app/webapi/CopilotChatWebApi.csproj", - "/property:GenerateFullPaths=true", - "/consoleloggerparameters:NoSummary", - "/property:DebugType=portable" - ], - "problemMatcher": "$msCompile", - "group": "build" - }, - { - "label": "run (CopilotChatApi)", - "command": "dotnet", - "type": "process", - "args": ["run", "--project", "${workspaceFolder}/samples/apps/copilot-chat-app/webapi/CopilotChatWebApi.csproj"], - "problemMatcher": "$msCompile", - "group": "test", - "presentation": { - "reveal": "always", - "panel": "shared", - "group": "copilot" - } - }, - { - "label": "watch (CopilotChatApi)", - "command": "dotnet", - "type": "process", - "args": [ - "watch", - "run", - "--project", - "${workspaceFolder}/samples/apps/copilot-chat-app/webapi/CopilotChatWebApi.csproj" - ], - "problemMatcher": "$msCompile", - "group": "build" - } - ], - "inputs": [ - { - "id": "completionSecret", - "type": "promptString", - "default": "", - "description": "Enter a secret for completion", - "password": true - }, - { - "id": "embeddingSecret", - "type": "promptString", - "default": "", - "description": "Enter a secret for embedding", - "password": true - }, - { - "id": "plannerSecret", - "type": "promptString", - "default": "", - "description": "Enter a secret for planner", - "password": true - } - ] + "version": "2.0.0", + "tasks": [ + // Copilot Chat + { + "label": "run (Copilot Chat)", + "detail": "Run all copilot chat components", + "group": "test", + "dependsOn": ["run (CopilotChatWebApi)", "run (CopilotChatApp)"], + "dependsOrder": "parallel" + }, + // Copilot Setup + { + "label": "install (CopilotChatApp)", + "detail": "Install all copilot chat app dependencies", + "type": "shell", + "group": "build", + "command": "yarn", + "presentation": { + "echo": true, + "reveal": "always", + "showReuseMessage": false, + "panel": "shared", + "group": "buildTasks" + }, + "options": { + "cwd": "${workspaceFolder}/samples/apps/copilot-chat-app/webapp" + }, + "problemMatcher": [] + }, + { + "label": "setup (Copilot Chat)", + "detail": "Setup (like setting secrets) for copilot chat app and api", + "group": "test", + "dependsOn": ["GetSecret (AIService:Key)"], + "dependsOrder": "sequence" + // TODO -- add tasks for configuring environment variables + }, + { + "label": "GetSecret (AIService:Key)", + "command": "dotnet", + "type": "process", + "args": ["user-secrets", "set", "AIService:Key", "${input:aiServiceSecret}"], + "options": { + "cwd": "${workspaceFolder}/samples/apps/copilot-chat-app/webapi" + } + }, + // Copilot Chat App + { + "label": "build (CopilotChatApp)", + "type": "shell", + "group": "build", + "command": "yarn build", + "presentation": { + "echo": true, + "reveal": "always", + "panel": "shared", + "group": "buildTasks" + }, + "options": { + "cwd": "${workspaceFolder}/samples/apps/copilot-chat-app/webapp" + }, + "problemMatcher": [] + }, + { + "label": "run (CopilotChatApp)", + "type": "shell", + "group": "test", + "command": "yarn start", + "presentation": { + "reveal": "always", + "panel": "shared", + "group": "copilot" + }, + "options": { + "cwd": "${workspaceFolder}/samples/apps/copilot-chat-app/webapp" + } + }, + // Copilot Chat Api + { + "label": "build (CopilotChatWebApi)", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/samples/apps/copilot-chat-app/webapi/CopilotChatWebApi.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary", + "/property:DebugType=portable" + ], + "problemMatcher": "$msCompile", + "group": "build" + }, + { + "label": "run (CopilotChatWebApi)", + "command": "dotnet", + "type": "process", + "args": [ + "run", + "--project", + "${workspaceFolder}/samples/apps/copilot-chat-app/webapi/CopilotChatWebApi.csproj" + ], + "problemMatcher": "$msCompile", + "group": "test", + "presentation": { + "reveal": "always", + "panel": "shared", + "group": "copilot" + } + }, + { + "label": "watch (CopilotChatWebApi)", + "command": "dotnet", + "type": "process", + "args": [ + "watch", + "run", + "--project", + "${workspaceFolder}/samples/apps/copilot-chat-app/webapi/CopilotChatWebApi.csproj" + ], + "problemMatcher": "$msCompile", + "group": "build" + } + ], + "inputs": [ + { + "id": "aiServiceSecret", + "type": "promptString", + "default": "", + "description": "Enter a secret for Copilot Chat AIService:Key", + "password": true + } + ] } diff --git a/samples/apps/copilot-chat-app/webapi/README.md b/samples/apps/copilot-chat-app/webapi/README.md index d4701084ce..553c263f34 100644 --- a/samples/apps/copilot-chat-app/webapi/README.md +++ b/samples/apps/copilot-chat-app/webapi/README.md @@ -46,14 +46,14 @@ You can start the WebApi service using the command-line, Visual Studio Code, or ``` ## Visual Studio Code -1. build (CopilotChatApi) -2. run (CopilotChatApi) -3. [optional] watch (CopilotChatApi) +1. build (CopilotChatWebApi) +2. run (CopilotChatWebApi) +3. [optional] watch (CopilotChatWebApi) ## Visual Studio (2022 or newer) 1. Open the solution file in Visual Studio 2022 or newer (`semantic-kernel/dotnet/SK-dotnet.sln`). 1. In the solution explorer expand the `samples` folder. -1. Right-click on the `CopilotChatApi` and select `Set as Startup Project`. +1. Right-click on the `CopilotChatWebApi` and select `Set as Startup Project`. 1. Start debugging by pressing `F5` or selecting the menu item `Debug`->`Start Debugging`. # (Optional) Enabling the Qdrant Memory Store