Skip to content

Commit

Permalink
Merge branch 'microsoft:main' into chat-controller-enhance-plugin-reg…
Browse files Browse the repository at this point in the history
…istration
  • Loading branch information
Ahmed-Adel3 authored Mar 22, 2024
2 parents 76b617b + 216f4f2 commit 9fff726
Show file tree
Hide file tree
Showing 13 changed files with 621 additions and 607 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/copilot-build-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ jobs:
fetch-depth: 0

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
uses: gittools/actions/gitversion/setup@v1
with:
versionSpec: "5.x"

- name: Determine version
id: gitversion
uses: gittools/actions/gitversion/execute@v0
uses: gittools/actions/gitversion/execute@v1

- name: Set version tag
id: versiontag
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/copilot-build-memorypipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ jobs:
fetch-depth: 0

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
uses: gittools/actions/gitversion/setup@v1
with:
versionSpec: "5.x"

- name: Determine version
id: gitversion
uses: gittools/actions/gitversion/execute@v0
uses: gittools/actions/gitversion/execute@v1

- name: Set version tag
id: versiontag
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/copilot-build-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ jobs:
fetch-depth: 0

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
uses: gittools/actions/gitversion/setup@v1
with:
versionSpec: "5.x"

- name: Determine version
id: gitversion
uses: gittools/actions/gitversion/execute@v0
uses: gittools/actions/gitversion/execute@v1

- name: Set version tag
id: versiontag
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copilot-deploy-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
echo "backend-host=$WEB_APP_NAME" >> $GITHUB_OUTPUT
- name: Enable Run From Package
uses: azure/CLI@v1
uses: azure/CLI@v2
with:
azcliversion: 2.30.0
inlineScript: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copilot-deploy-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
enable-AzPSSession: false

- name: deploy-infra
uses: azure/CLI@v1
uses: azure/CLI@v2
with:
azcliversion: 2.30.0
inlineScript: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copilot-deploy-memorypipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
echo "AZURE_WEBAPP_NAME=$WEB_APP_NAME" >> $GITHUB_ENV
- name: Enable Run From Package
uses: azure/CLI@v1
uses: azure/CLI@v2
with:
azcliversion: 2.30.0
inlineScript: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/copilot-run-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ jobs:
- name: Configure test environment
working-directory: integration-tests
env:
Username: ${{secrets.COPILOT_CHAT_TEST_USER_ACCOUNT1}}
Password: ${{secrets.COPILOT_CHAT_TEST_USER_PASSWORD1}}
TestUsername: ${{secrets.COPILOT_CHAT_TEST_USER_ACCOUNT1}}
TestPassword: ${{secrets.COPILOT_CHAT_TEST_USER_PASSWORD1}}
run: |
dotnet user-secrets set "BaseServerUrl" "https://${{inputs.BACKEND_HOST}}.azurewebsites.net/"
dotnet user-secrets set "Authority" "https://login.microsoftonline.com/${{vars.APPLICATION_TENANT_ID}}"
dotnet user-secrets set "ClientID" ${{vars.APPLICATION_CLIENT_ID}}
dotnet user-secrets set "Scopes" "openid, offline_access, profile, api://${{vars.BACKEND_CLIENT_ID}}/access_as_user"
dotnet user-secrets set "Username" "$env:Username"
dotnet user-secrets set "Password" "$env:Password"
# dotnet user-secrets set "TestUsername" "$env:TestUsername"
# dotnet user-secrets set "TestPassword" "$env:TestPassword"
- name: Run integration tests
run: dotnet test --logger trx
4 changes: 2 additions & 2 deletions integration-tests/ChatCopilotIntegrationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public abstract class ChatCopilotIntegrationTest : IDisposable
protected const string BaseUrlSettingName = "BaseServerUrl";
protected const string ClientIdSettingName = "ClientID";
protected const string AuthoritySettingName = "Authority";
protected const string UsernameSettingName = "Username";
protected const string PasswordSettingName = "Password";
protected const string UsernameSettingName = "TestUsername";
protected const string PasswordSettingName = "TestPassword";
protected const string ScopesSettingName = "Scopes";

protected readonly HttpClient _httpClient;
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/testsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"BaseServerUrl": "https://localhost:40443/",
"ClientID": "YOUR_FRONTEND_CLIEND_ID",
"Authority": "https://login.microsoftonline.com/YOUR_TENANT_ID",
"Username": "YOUR_TEST_USERNAME", // Note that an environment variable with this name is usually set and will override this value!
"Password": "YOUR_TEST_PASSWORD", // Take care not to check your password in
"TestUsername": "YOUR_TEST_USERNAME",
"TestPassword": "YOUR_TEST_PASSWORD", // Take care not to check your password in
"Scopes": "openid, offline_access, profile, api://YOUR_BACKEND_CLIENT_ID/access_as_user"
}
2 changes: 1 addition & 1 deletion webapi/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
"SystemCognitive": "We are building a cognitive architecture and need to extract the various details necessary to serve as the data for simulating a part of our memory system. There will eventually be a lot of these, and we will search over them using the embeddings of the labels and details compared to the new incoming chat requests, so keep that in mind when determining what data to store for this particular type of memory simulation. There are also other types of memory stores for handling different types of memories with differing purposes, levels of detail, and retention, so you don't need to capture everything - just focus on the items needed for {{$memoryName}}. Do not make up or assume information that is not supported by evidence. Perform analysis of the chat history so far and extract the details that you think are important in JSON format: {{$format}}",
"MemoryFormat": "{\"items\": [{\"label\": string, \"details\": string }]}",
"MemoryAntiHallucination": "IMPORTANT: DO NOT INCLUDE ANY OF THE ABOVE INFORMATION IN THE GENERATED RESPONSE AND ALSO DO NOT MAKE UP OR INFER ANY ADDITIONAL INFORMATION THAT IS NOT INCLUDED BELOW. ALSO DO NOT RESPOND IF THE LAST MESSAGE WAS NOT ADDRESSED TO YOU.",
"MemoryContinuation": "Generate a well-formed JSON of extracted context data. DO NOT include a preamble in the response. DO NOT give a list of possible responses. Only provide a single response of the json block.\nResponse:",
"MemoryContinuation": "Generate a well-formed JSON representation of the extracted context data. DO NOT include a preamble in the response. DO NOT give a list of possible responses. Only provide a single response that consists of NOTHING else but valid JSON.\nResponse:",
"WorkingMemoryName": "WorkingMemory", // The name used for the container that stores Working Memory in the Kernel Memory database. This should not be changed once memories are established.
"WorkingMemoryExtraction": "Extract information for a short period of time, such as a few seconds or minutes. It should be useful for performing complex cognitive tasks that require attention, concentration, or mental calculation.",
"LongTermMemoryName": "LongTermMemory", // The name used for the container that stores Long Term Memory in the Kernel Memory database. This should not be changed once memories are established.
Expand Down
8 changes: 4 additions & 4 deletions webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"dependencies": {
"@azure/msal-browser": "^2.38.3",
"@azure/msal-react": "^1.5.11",
"@fluentui/react-components": "^9.46.7",
"@fluentui/react-icons": "^2.0.230",
"@fluentui/react-components": "^9.47.1",
"@fluentui/react-icons": "^2.0.232",
"@fluentui/react-northstar": "^0.66.4",
"@microsoft/signalr": "^8.0.0",
"@playwright/test": "^1.42.1",
Expand All @@ -36,14 +36,14 @@
"@types/debug": "^4.1.12",
"@types/node": "^20.11.24",
"@types/react": "^18.2.56",
"@types/react-dom": "^18.2.19",
"@types/react-dom": "^18.2.22",
"@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.21.0",
"eslint": "^8.57.0",
"prettier": "^3.2.5",
"react-scripts": "^5.0.1",
"serve": "^14.2.1",
"typescript": "5.3.3"
"typescript": "5.4.3"
},
"browserslist": {
"production": [
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/components/chat/prompt-dialog/PromptDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ export const PromptDialog: React.FC<IPromptDialogProps> = ({ message }) => {

// Backend can be configured to return the raw response from Stepwise Planner. In this case, no meta prompt was generated or completed
// and we should show the Stepwise thought process as the raw content view.
if ((prompt as BotResponsePrompt).metaPromptTemplate.length <= 0) {
(prompt as BotResponsePrompt).rawView = (
if (prompt.metaPromptTemplate.length <= 0) {
prompt.rawView = (
<pre className={mergeClasses(dialogClasses.text, classes.text)}>
{JSON.stringify(JSON.parse(details.stepsTaken), null, 2)}
</pre>
Expand Down
Loading

0 comments on commit 9fff726

Please sign in to comment.