Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
ef2311e
Deploymeny pipeline setup for semantic-memory integration
TaoChenOSU Aug 3, 2023
28ba546
Merge branch 'main' into feature-semantic-memory
crickman Aug 4, 2023
239f11c
Merge branch 'main' into feature-semantic-memory
crickman Aug 7, 2023
0a9b8d7
Merge branch 'main' into feature-semantic-memory
crickman Aug 8, 2023
90271d0
Merge branch 'main' into feature-semantic-memory
crickman Aug 9, 2023
5088c4c
Semantic memory pipeline service (#140)
TaoChenOSU Aug 9, 2023
da10b8f
Rename project and namespace for memory pipeline (#146)
TaoChenOSU Aug 9, 2023
7a4e391
Checkpoint
crickman Aug 11, 2023
889d698
Merge branch 'feature-semantic-memory' of https://github.com/microsof…
crickman Aug 11, 2023
ab59840
Checkpoint
crickman Aug 11, 2023
8ef45df
Merge
crickman Aug 11, 2023
fc48bed
Typo
crickman Aug 11, 2023
354980e
Fix the memory pipeline build csproj file name (#154)
TaoChenOSU Aug 11, 2023
231bb07
Fix webapi semantic memory package ref (#155)
TaoChenOSU Aug 11, 2023
95696bb
Temp workaround to include custom nuget feed for webapi in build pipe…
TaoChenOSU Aug 11, 2023
c503897
Fix webapi package pipeline command line continuation (#157)
TaoChenOSU Aug 11, 2023
d3285a5
Fix typo in ServiceExtensions (#158)
TaoChenOSU Aug 11, 2023
10a2e61
Fix SemanticMemoryExtensions.cs formatting (#159)
TaoChenOSU Aug 11, 2023
2cf4f9e
Sort SemanticMemoryExtensions.cs imports (#160)
TaoChenOSU Aug 11, 2023
0d6aac8
Hack Github action: no reusable workflow (#163)
TaoChenOSU Aug 11, 2023
1d07f9e
Update semantic-memory package version
crickman Aug 11, 2023
05015fa
Version 12
crickman Aug 11, 2023
3fd2c62
Merge branch 'feature-semantic-memory' of https://github.com/microsof…
crickman Aug 11, 2023
3ed154e
Resolve merge from main
crickman Aug 15, 2023
cb09133
Search/Ask POC
crickman Aug 16, 2023
adb7c08
Typo fix
crickman Aug 16, 2023
6512929
Spelling
crickman Aug 16, 2023
c78990e
Acquire SemanticMemory from a public feed (#196)
TaoChenOSU Aug 16, 2023
17f40cc
Merge branch 'main' into feature-semantic-memory
TaoChenOSU Aug 17, 2023
b0b255f
Semantic memory pipeline deployment (#200)
TaoChenOSU Aug 17, 2023
15524ce
Set fetch depth to 0 for GitVersion to work (#201)
TaoChenOSU Aug 17, 2023
8a52af7
Fix typo (#202)
TaoChenOSU Aug 17, 2023
2a185e1
Fix deploy pipeline needs and import ordering (#203)
TaoChenOSU Aug 17, 2023
85873cf
Merge branch 'main' into feature-semantic-memory
crickman Aug 17, 2023
db3b150
Add addition params of web api to main bicep (#204)
TaoChenOSU Aug 17, 2023
1f38b56
Revert "Add addition params of web api to main bicep (#204)" (#211)
TaoChenOSU Aug 18, 2023
8a65a88
Add SemanticMemory ContentStorageType config to main.bicep
TaoChenOSU Aug 18, 2023
497653b
Add SemanticMemory DataIngestion config to main.bicep
TaoChenOSU Aug 18, 2023
d270f33
Add SemanticMemory Services AzureBlobs to main.bicep
TaoChenOSU Aug 18, 2023
db82ba1
Add SemanticMemory Services AzureQueue and ACS to main.bicep
TaoChenOSU Aug 18, 2023
b178011
Add SemanticMemory Services AzureOpenAIText and AzureOpenAIEmbedding …
TaoChenOSU Aug 18, 2023
4b26618
Add SemanticMemory Retrieval to main.bicep
TaoChenOSU Aug 18, 2023
c4d4f2f
Fix ACS config in main.bicep
TaoChenOSU Aug 18, 2023
b17d39d
Set memory pipeline service to always on
TaoChenOSU Aug 18, 2023
6ea6415
Resolve merge from main
crickman Aug 21, 2023
b54c872
Final merge
crickman Aug 21, 2023
3d3989a
Final merge
crickman Aug 21, 2023
8343a2c
Port changes (safety and auth)
crickman Aug 21, 2023
cc2b18f
CodeQL hail-mary
crickman Aug 21, 2023
53796b3
Semantic-memory nuget upgrade / break refactoring
crickman Aug 21, 2023
1d265a2
Route adjustments
crickman Aug 21, 2023
03efb49
Namespace cleanup
crickman Aug 21, 2023
316b1f0
Merge branch 'main' into feature-semantic-memory
crickman Aug 21, 2023
779fbc5
Consolidate memory options
crickman Aug 21, 2023
7da1c0c
Merge from feature branch
crickman Aug 21, 2023
641c81b
Sync enum name change
crickman Aug 21, 2023
d381d86
Config fixes
crickman Aug 22, 2023
7134cc1
Clean-up merge
crickman Aug 22, 2023
c85e447
Merge branch 'main' into feature-semantic-memory
TaoChenOSU Aug 22, 2023
86a32ce
Run dotnet format for memorypipeline
TaoChenOSU Aug 22, 2023
bea3d92
Formalize memory calls
crickman Aug 22, 2023
8f4e7e9
Merge branch 'feature-semantic-memory' of https://github.com/microsof…
crickman Aug 22, 2023
501c524
Fix deploy pipeline
TaoChenOSU Aug 22, 2023
891a4f0
Add memory pipeline readme
TaoChenOSU Aug 22, 2023
b4e075d
Semantic Memory nuget update
crickman Aug 23, 2023
307ef3d
Resolve nuget update
crickman Aug 23, 2023
dcca951
Make QueryMemoriesAsync a valid native SK function
TaoChenOSU Aug 23, 2023
9685fe6
Settings sync (from our discussion) - consistent but not final
crickman Aug 23, 2023
d76c33e
Use memory tag
crickman Aug 24, 2023
eb170f5
Package grouping
crickman Aug 24, 2023
42f24c8
Merge branch 'main' into feature-semantic-memory
TaoChenOSU Aug 24, 2023
a03a7ae
Update Semantic Memory to 0.0.230823.2-preview
TaoChenOSU Aug 24, 2023
86238de
Update appsettings for semantic-memory package update
TaoChenOSU Aug 24, 2023
57a5172
Update memorypipeline/Program.cs - App title ordering
crickman Aug 25, 2023
80f32d7
Add citation (#247)
TaoChenOSU Aug 25, 2023
c77a975
Update bicep template
TaoChenOSU Aug 25, 2023
030a86d
Fix main.bicep config
TaoChenOSU Aug 27, 2023
b779b48
Merge from main
crickman Aug 28, 2023
b431d5d
Update semantic-memory nuget
crickman Aug 28, 2023
ff1db3c
Remove unused memory namespace
crickman Aug 28, 2023
a7739bc
Add log to AppInsights
TaoChenOSU Aug 28, 2023
a65615c
Update appsettings due to package update
TaoChenOSU Aug 28, 2023
a83f3a0
Add OpenAIText Generation to main.bicep for memory pipeline
TaoChenOSU Aug 29, 2023
f13de46
Nuget update & package cleanup
crickman Aug 29, 2023
7611384
Merge from main
crickman Aug 29, 2023
8f810db
Merge latest semantic-memory nuget, and main
crickman Aug 29, 2023
8bf3e52
Resolve merge
crickman Aug 29, 2023
a727c8f
Checkpoint (inprogress)
crickman Aug 29, 2023
bf49796
Merge
crickman Aug 29, 2023
828d2f1
Add back citation rendering
TaoChenOSU Aug 29, 2023
26652a8
Break citations into multiple lines
TaoChenOSU Aug 30, 2023
3ebecd1
Checkpoint
crickman Aug 30, 2023
1f3af95
Another check-point
crickman Aug 30, 2023
25b4e5f
Merge branch 'feature-semantic-memory' of https://github.com/microsof…
crickman Aug 30, 2023
c29df6f
Clean-up and integration
crickman Aug 30, 2023
343ba7b
Consolidate settings
crickman Aug 30, 2023
04c5886
Namespace cleanup
crickman Aug 30, 2023
a6bd20c
Introduce shared project: Chat Core & support inprocess mode
crickman Aug 30, 2023
9fadfc2
Core.csproj => Shared.csproj
crickman Aug 30, 2023
4dd9792
Update bicep template
TaoChenOSU Aug 30, 2023
44f2b32
Enable Azure Form Recognizer
TaoChenOSU Aug 30, 2023
2e8f308
Fix memory-client builder construction
crickman Aug 31, 2023
8ce83d8
Revert "Fix memory-client builder construction"
TaoChenOSU Aug 31, 2023
8dc92cf
Update appsettings comments to match CC standards
crickman Aug 31, 2023
dc485b6
Merge branch 'feature-semantic-memory' of https://github.com/microsof…
crickman Aug 31, 2023
e408c94
Memory formatting fix
crickman Aug 31, 2023
eb59096
Update document snippet prefix
crickman Aug 31, 2023
a39ab69
Deploy to Linux OS
TaoChenOSU Sep 1, 2023
4c71ec5
Merge from main
crickman Sep 1, 2023
b542f62
Merge from main
crickman Sep 1, 2023
eef8b52
Revert "Deploy to Linux OS"
TaoChenOSU Sep 1, 2023
8cb3735
Deploy in process ochestrator
TaoChenOSU Sep 4, 2023
26c1987
Allow AzureOpenAI
TaoChenOSU Sep 4, 2023
b9c1f42
Fix contentSafety route
crickman Sep 6, 2023
e8b3bc2
Merge branch 'feature-semantic-memory' of https://github.com/microsof…
crickman Sep 6, 2023
0e4d708
Orphaned code and comment clean-up
crickman Sep 6, 2023
cd0d708
Fix typos
crickman Sep 6, 2023
d70b323
Merge branch 'main' into feature-semantic-memory
TaoChenOSU Sep 7, 2023
54ede41
Update semantic memory to 0.2.230906.1-preview
TaoChenOSU Sep 7, 2023
d805685
Update memory pipeline SK to 0.21.230828.2-preview
TaoChenOSU Sep 7, 2023
1793743
Order elements in documentation comment
TaoChenOSU Sep 7, 2023
3a5e55e
Update user secret ids
TaoChenOSU Sep 7, 2023
082f8c3
Update Semantic Memory to 0.2.230907.2-preview
TaoChenOSU Sep 7, 2023
c9147a7
Add retrieval settings to memory pipeline bicep config
TaoChenOSU Sep 7, 2023
2a5908d
Update semantic memory to 0.2.230908.2-preview
TaoChenOSU Sep 8, 2023
c2e9d67
Add app insights to memory pipeline
TaoChenOSU Sep 9, 2023
f93da1a
Hack: default to AzureCognitiveSearch for deployment in appsettings
TaoChenOSU Sep 11, 2023
114ba90
Hack: memorypipeline default to AzureCognitiveSearch for deployment i…
TaoChenOSU Sep 11, 2023
ae5b4b7
Fix token count related memory leak
crickman Sep 11, 2023
e26b79a
Merge branch 'feature-semantic-memory' of https://github.com/microsof…
crickman Sep 11, 2023
d71f18e
dotnet format fix
crickman Sep 11, 2023
2444137
Revert "Hack: memorypipeline default to AzureCognitiveSearch for depl…
TaoChenOSU Sep 11, 2023
4e7dbc5
Revert "Hack: default to AzureCognitiveSearch for deployment in appse…
TaoChenOSU Sep 11, 2023
510b4b1
Correctly configure arrays in main.bicep
TaoChenOSU Sep 11, 2023
31a8953
Add back SimpleVectorDb as a storage type
TaoChenOSU Sep 11, 2023
66b3523
Merge from main
crickman Sep 11, 2023
aa27abf
Merge branch 'feature-semantic-memory' of https://github.com/microsof…
crickman Sep 11, 2023
132ebf7
Remove citationlink
crickman Sep 11, 2023
70e1339
Remove unused namespace imports
crickman Sep 11, 2023
3c6b1d3
Refactor chat message to formatted string method
TaoChenOSU Sep 11, 2023
6b3c80a
Remove ISemanticTextMemory - BotController refactor coming
TaoChenOSU Sep 11, 2023
25ac0ad
Merge from main (Maitenance mode and package updates)
crickman Sep 12, 2023
910eca3
Cleanup extra namespace imports
crickman Sep 12, 2023
a064b84
Remove unused constant
crickman Sep 12, 2023
3325d65
Update packages (from main)
crickman Sep 12, 2023
33d3d5f
Fix async declaration (github build)
crickman Sep 12, 2023
83fb619
And fix method name
crickman Sep 12, 2023
5c460ac
Fix using
crickman Sep 12, 2023
e91d91e
Update memory nuget...misc cleanup
crickman Sep 12, 2023
7742f5f
Document tokens => size in bytes
crickman Sep 12, 2023
fe7ece4
Fix memory reference in shared
crickman Sep 12, 2023
1d78d93
Update citations (#335)
TaoChenOSU Sep 12, 2023
f20fdc0
Fix list of vector databases
crickman Sep 12, 2023
dfe135d
Merge branch 'feature-semantic-memory' of https://github.com/microsof…
crickman Sep 12, 2023
68dadd3
Remove document context weight and increase memory context weight
TaoChenOSU Sep 13, 2023
e22cad7
Fix file copy/paste naming mistake
crickman Sep 13, 2023
1605f80
BotUpdate - Export/Download Only
crickman Sep 13, 2023
eab85a8
Update nuget / remove summarize handler
crickman Sep 13, 2023
fb79412
Merge branch 'main' into feature-semantic-memory
TaoChenOSU Sep 13, 2023
1051ee1
Update readme
TaoChenOSU Sep 13, 2023
7c9e0f5
Limit memory result to "1" for exists check
crickman Sep 13, 2023
4866d43
Add volatile option to SimpleVectorDb
TaoChenOSU Sep 13, 2023
51543e5
Inline citations (#349)
TaoChenOSU Sep 14, 2023
00f146c
Update configure scripts and readme
TaoChenOSU Sep 14, 2023
315b1d6
Bug fix and prompt tuning
TaoChenOSU Sep 14, 2023
7355024
Fix bot controller (download)
crickman Sep 15, 2023
def6a04
Merge branch 'feature-semantic-memory' of https://github.com/microsof…
crickman Sep 15, 2023
d3e36b1
Comments
crickman Sep 15, 2023
9e0adda
Spelling
crickman Sep 15, 2023
6107024
Fix type name change
crickman Sep 15, 2023
a0d3c1a
Merge from main
crickman Sep 15, 2023
14425ef
Format clean-up
crickman Sep 15, 2023
57a609e
Merge from main
crickman Sep 18, 2023
ac1dd9f
Merge from main
crickman Sep 19, 2023
dcbb82f
Comment clean-up (#47)
crickman Sep 19, 2023
fd4ee0d
Type name fix
crickman Sep 19, 2023
bc5231c
Remove un-used namespaces
crickman Sep 19, 2023
c876b63
Bot controller fix
crickman Sep 19, 2023
7b9712b
Minor polish
crickman Sep 19, 2023
a578617
Rename cancellationToken
crickman Sep 19, 2023
b9d5f99
Merge branch 'main' into feature-semantic-memory
TaoChenOSU Sep 19, 2023
c7f67c1
Update Semantic Memory to 0.2.230919.2-preview
TaoChenOSU Sep 19, 2023
b33605c
Remove README in shared
TaoChenOSU Sep 19, 2023
9024822
Semantic Memory Migration Breakout (#308)
crickman Sep 20, 2023
55e3c50
Switch namespace (Chroma <=> Qdrant)
crickman Sep 20, 2023
0daa932
Update memory latest package aka link
TaoChenOSU Sep 20, 2023
cf563fd
2 => 3 components
crickman Sep 20, 2023
e016e65
Merge branch 'feature-semantic-memory' of https://github.com/microsof…
crickman Sep 20, 2023
4769cf8
Revert GitHub workflow for merging
TaoChenOSU Sep 20, 2023
8b3c75c
Update deployment readme
TaoChenOSU Sep 20, 2023
5557841
Update deploy-azure scripts for NoDeployPackage
TaoChenOSU Sep 20, 2023
c9e37da
Typo fix
crickman Sep 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/copilot-build-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
workflow_call:
outputs:
artifact:
description: "The name of the uploaded artifact."
description: "The name of the uploaded web api artifact."
value: ${{jobs.webapi.outputs.artifact}}

permissions:
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/copilot-build-memorypipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: copilot-build-memorypipeline

on:
pull_request:
branches: ["main"]
paths:
- "memorypipeline/**"
workflow_call:
outputs:
artifact:
description: "The name of the uploaded memory pipeline artifact."
value: ${{jobs.memory-pipeline.outputs.artifact}}

permissions:
contents: read

jobs:
memory-pipeline:
runs-on: windows-latest

env:
NUGET_CERT_REVOCATION_MODE: offline

outputs:
artifact: ${{steps.artifactoutput.outputs.artifactname}}

steps:
- uses: actions/checkout@v3
with:
clean: true
fetch-depth: 0

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

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

- name: Set version tag
id: versiontag
run: |
$VERSION_TAG = "${{ steps.gitversion.outputs.Major }}."
$VERSION_TAG += "${{ steps.gitversion.outputs.Minor }}."
$VERSION_TAG += "${{ steps.gitversion.outputs.CommitsSinceVersionSource }}"
echo $VERSION_TAG
Write-Output "versiontag=$VERSION_TAG" >> $env:GITHUB_OUTPUT

- name: Set .Net Core version
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

- name: Package Copilot Chat Memory Pipeline
run: |
scripts\deploy\package-memorypipeline.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")"

- name: Upload package to artifacts
uses: actions/upload-artifact@v3
with:
name: copilotchat-memorypipeline-${{ steps.versiontag.outputs.versiontag }}
path: ${{ github.workspace }}\scripts\deploy\out\memorypipeline.zip

- name: "Set outputs"
id: artifactoutput
run: Write-Output "artifactname=copilotchat-memorypipeline-${{ steps.versiontag.outputs.versiontag }}" >> $env:GITHUB_OUTPUT
19 changes: 17 additions & 2 deletions .github/workflows/copilot-deploy-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ on:
ENVIRONMENT:
required: true
type: string
ARTIFACT_NAME:
WEBAPI_ARTIFACT_NAME:
required: true
type: string
MEMORYPIPELINE_ARTIFACT_NAME:
required: true
type: string
secrets:
Expand Down Expand Up @@ -42,7 +45,19 @@ jobs:
needs: [deploy-infra]
uses: ./.github/workflows/copilot-deploy-backend.yml
with:
ARTIFACT_NAME: ${{inputs.ARTIFACT_NAME}}
ARTIFACT_NAME: ${{inputs.WEBAPI_ARTIFACT_NAME}}
DEPLOYMENT_NAME: ${{needs.deploy-infra.outputs.deployment-id}}
ENVIRONMENT: ${{inputs.ENVIRONMENT}}
secrets:
AZURE_CLIENT_ID: ${{secrets.AZURE_CLIENT_ID}}
AZURE_TENANT_ID: ${{secrets.AZURE_TENANT_ID}}
AZURE_SUBSCRIPTION_ID: ${{secrets.AZURE_SUBSCRIPTION_ID}}

deploy-memorypipeline:
needs: [deploy-infra]
uses: ./.github/workflows/copilot-deploy-memorypipeline.yml
with:
ARTIFACT_NAME: ${{inputs.MEMORYPIPELINE_ARTIFACT_NAME}}
DEPLOYMENT_NAME: ${{needs.deploy-infra.outputs.deployment-id}}
ENVIRONMENT: ${{inputs.ENVIRONMENT}}
secrets:
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/copilot-deploy-memorypipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: copilot-deploy-memorypipeline

on:
workflow_call:
inputs:
ARTIFACT_NAME:
required: true
type: string
ENVIRONMENT:
required: true
type: string
DEPLOYMENT_NAME:
required: true
type: string
secrets:
AZURE_CLIENT_ID:
required: true
AZURE_TENANT_ID:
required: true
AZURE_SUBSCRIPTION_ID:
required: true

permissions:
contents: read

jobs:
memorypipeline:
environment: ${{inputs.ENVIRONMENT}}
permissions:
id-token: write
strategy:
fail-fast: false
matrix:
include:
- { dotnet: "6.0", configuration: Release, os: ubuntu-latest }

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
clean: true

- uses: actions/download-artifact@v3
with:
name: ${{inputs.ARTIFACT_NAME}}
path: "${{ github.workspace }}/${{inputs.ARTIFACT_NAME}}"

- name: "Display downloaded content"
run: ls -R
working-directory: "${{ github.workspace }}/${{inputs.ARTIFACT_NAME}}"

- name: Azure login
uses: azure/login@v1
with:
client-id: ${{secrets.AZURE_CLIENT_ID}}
tenant-id: ${{secrets.AZURE_TENANT_ID}}
subscription-id: ${{secrets.AZURE_SUBSCRIPTION_ID}}
enable-AzPSSession: false

- name: Get app name
run: |
WEB_APP_NAME=$(az deployment group show --name ${{inputs.DEPLOYMENT_NAME}} --resource-group ${{vars.CC_DEPLOYMENT_GROUP_NAME}} --output json | jq -r '.properties.outputs.memoryPipelineName.value')
echo "AZURE_WEBAPP_NAME=$WEB_APP_NAME" >> $GITHUB_ENV

- name: Enable Run From Package
uses: azure/CLI@v1
with:
azcliversion: 2.30.0
inlineScript: |
az webapp config appsettings set --resource-group ${{vars.CC_DEPLOYMENT_GROUP_NAME}} --name ${{ env.AZURE_WEBAPP_NAME }} --settings WEBSITE_RUN_FROM_PACKAGE="1" -o none

- name: "Deploy"
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
package: "${{ github.workspace }}/${{inputs.ARTIFACT_NAME}}/memorypipeline.zip"
15 changes: 10 additions & 5 deletions .github/workflows/copilot-deploy-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@ permissions:
id-token: write

jobs:
build:
build-webapi:
uses: ./.github/workflows/copilot-build-backend.yml

build-memorypipeline:
uses: ./.github/workflows/copilot-build-memorypipeline.yml

int:
needs: build
needs: [build-webapi, build-memorypipeline]
uses: ./.github/workflows/copilot-deploy-environment.yml
with:
ENVIRONMENT: int
ARTIFACT_NAME: ${{needs.build.outputs.artifact}}
WEBAPI_ARTIFACT_NAME: ${{needs.build-webapi.outputs.artifact}}
MEMORYPIPELINE_ARTIFACT_NAME: ${{needs.build-memorypipeline.outputs.artifact}}
secrets:
AZURE_CLIENT_ID: ${{secrets.AZURE_CLIENT_ID}}
AZURE_TENANT_ID: ${{secrets.AZURE_TENANT_ID}}
Expand All @@ -37,11 +41,12 @@ jobs:
BACKEND_HOST: ${{needs.int.outputs.backend-host}}

stable:
uses: ./.github/workflows/copilot-deploy-environment.yml
needs: int-tests
uses: ./.github/workflows/copilot-deploy-environment.yml
with:
ENVIRONMENT: stable
ARTIFACT_NAME: ${{needs.build.outputs.artifact}}
WEBAPI_ARTIFACT_NAME: ${{needs.build-webapi.outputs.artifact}}
MEMORYPIPELINE_ARTIFACT_NAME: ${{needs.build-memorypipeline.outputs.artifact}}
secrets:
AZURE_CLIENT_ID: ${{secrets.AZURE_CLIENT_ID}}
AZURE_TENANT_ID: ${{secrets.AZURE_TENANT_ID}}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dotnet-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: ["main", "feature*"]
paths:
- "webapi/**"
- "memorypipeline/**"
- "tools/**"

concurrency:
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -490,3 +490,8 @@ webapi/CopilotChatWebApi.sln

# Tesseract OCR language data files
*.traineddata

# Semantic Memory local storage
tmp-cache
tmp-database
tmp-queues
18 changes: 18 additions & 0 deletions CopilotChat.sln
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ VisualStudioVersion = 17.6.33706.43
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CopilotChatWebApi", "webapi\CopilotChatWebApi.csproj", "{5252E68F-B653-44CE-9A32-360A75C54E0E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CopilotChatMemoryPipeline", "memorypipeline\CopilotChatMemoryPipeline.csproj", "{EE1C907E-E90A-4AB5-9094-6CCE5F0DEDF8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImportDocument", "tools\importdocument\ImportDocument.csproj", "{F67EF16F-9A8A-4DC6-A9A1-E64CDFE4F285}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ChatCopilotIntegrationTests", "integration-tests\ChatCopilotIntegrationTests.csproj", "{0CD2CD95-536B-455F-B74A-772A455FA607}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CopilotChatShared", "shared\CopilotChatShared.csproj", "{94F12185-FAF9-43E3-B153-28A1708AC918}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -16,10 +22,22 @@ Global
{5252E68F-B653-44CE-9A32-360A75C54E0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5252E68F-B653-44CE-9A32-360A75C54E0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5252E68F-B653-44CE-9A32-360A75C54E0E}.Release|Any CPU.Build.0 = Release|Any CPU
{EE1C907E-E90A-4AB5-9094-6CCE5F0DEDF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EE1C907E-E90A-4AB5-9094-6CCE5F0DEDF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE1C907E-E90A-4AB5-9094-6CCE5F0DEDF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE1C907E-E90A-4AB5-9094-6CCE5F0DEDF8}.Release|Any CPU.Build.0 = Release|Any CPU
{F67EF16F-9A8A-4DC6-A9A1-E64CDFE4F285}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F67EF16F-9A8A-4DC6-A9A1-E64CDFE4F285}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F67EF16F-9A8A-4DC6-A9A1-E64CDFE4F285}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F67EF16F-9A8A-4DC6-A9A1-E64CDFE4F285}.Release|Any CPU.Build.0 = Release|Any CPU
{0CD2CD95-536B-455F-B74A-772A455FA607}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0CD2CD95-536B-455F-B74A-772A455FA607}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0CD2CD95-536B-455F-B74A-772A455FA607}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0CD2CD95-536B-455F-B74A-772A455FA607}.Release|Any CPU.Build.0 = Release|Any CPU
{94F12185-FAF9-43E3-B153-28A1708AC918}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{94F12185-FAF9-43E3-B153-28A1708AC918}.Debug|Any CPU.Build.0 = Debug|Any CPU
{94F12185-FAF9-43E3-B153-28A1708AC918}.Release|Any CPU.ActiveCfg = Release|Any CPU
{94F12185-FAF9-43E3-B153-28A1708AC918}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Chat Copilot Sample Application

This sample allows you to build your own integrated large language model (LLM) chat copilot. The sample is built on Microsoft [Semantic Kernel](https://github.com/microsoft/semantic-kernel) and has two components: a frontend [React web app](./webapp/) and a backend [.NET web API service](./webapi/).
This sample allows you to build your own integrated large language model (LLM) chat copilot. The sample is built on Microsoft [Semantic Kernel](https://github.com/microsoft/semantic-kernel) and has three components:

1. A frontend application [React web app](./webapp/)
2. A backend REST API [.NET web API service](./webapi/)
3. A [.NET worker service](./memorypipeline/) for processing semantic memory.

These quick-start instructions run the sample locally. They can also be found on the official Chat Copilot Microsoft Learn documentation page for [getting started](https://learn.microsoft.com/semantic-kernel/chat-copilot/getting-started).

Expand All @@ -16,9 +20,9 @@ To deploy the sample to Azure, please view [Deploying Chat Copilot](./scripts/de

You will need the following items to run the sample:

- [.NET 7.0 SDK](https://dotnet.microsoft.com/download/dotnet/7.0) _(via Setup install.* script)_
- [Node.js](https://nodejs.org/en/download) _(via Setup install.* script)_
- [Yarn](https://classic.yarnpkg.com/docs/install) _(via Setup install.* script)_
- [.NET 7.0 SDK](https://dotnet.microsoft.com/download/dotnet/7.0) _(via Setup install.\* script)_
- [Node.js](https://nodejs.org/en/download) _(via Setup install.\* script)_
- [Yarn](https://classic.yarnpkg.com/docs/install) _(via Setup install.\* script)_
- AI Service

| AI Service | Requirement |
Expand Down Expand Up @@ -149,6 +153,10 @@ You will need the following items to run the sample:
./start-backend.sh
```

## (Optional) Run the [memory pipeline](./memorypipeline/README.md)

By default, the webapi is configured to work without the memory pipeline for synchronous processing documents. To enable asynchronous document processing, you need to configure the webapi and the memory pipeline. Please refer to the [webapi README](./webapi/README.md) and the [memory pipeline README](./memorypipeline/README.md) for more information.

## (Optional) Enable backend authentication via Azure AD

By default, Chat Copilot runs locally without authentication, using a guest user profile. If you want to enable authentication with Azure Active Directory, follow the steps below.
Expand Down
22 changes: 22 additions & 0 deletions memorypipeline/CopilotChatMemoryPipeline.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<RootNamespace>CopilotChat.MemoryPipeline</RootNamespace>
<TargetFramework>net6.0</TargetFramework>
<RollForward>LatestMajor</RollForward>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<UserSecretsId>5ee045b0-aea3-4f08-8d31-32d1a6f8fed0</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\shared\CopilotChatShared.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
<PackageReference Include="Microsoft.SemanticKernel" Version="0.24.230918.1-preview" />
<PackageReference Include="Microsoft.SemanticMemory.Core" Version="0.2.230919.2-preview" />
</ItemGroup>

</Project>
55 changes: 55 additions & 0 deletions memorypipeline/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Copyright (c) Microsoft. All rights reserved.

using System;
using CopilotChat.Shared;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.SemanticMemory;
using Microsoft.SemanticMemory.Diagnostics;

// ********************************************************
// ************** SETUP ***********************************
// ********************************************************

var builder = WebApplication.CreateBuilder();

ISemanticMemoryClient memory =
new MemoryClientBuilder(builder.Services)
.FromAppSettings()
.WithoutSummarizeHandlers()
.WithCustomOcr(builder.Configuration)
.Build();

builder.Services.AddSingleton(memory);

builder.Services.AddApplicationInsightsTelemetry();

var app = builder.Build();

DateTimeOffset start = DateTimeOffset.UtcNow;

// Simple ping endpoint
app.MapGet("/", () =>
{
var uptime = DateTimeOffset.UtcNow.ToUnixTimeSeconds() - start.ToUnixTimeSeconds();
var environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT");
var message = $"Memory pipeline is running. Uptime: {uptime} secs.";
if (!string.IsNullOrEmpty(environment))
{
message += $" Environment: {environment}";
}
return Results.Ok(message);
});

// ********************************************************
// ************** START ***********************************
// ********************************************************

app.Logger.LogInformation(
"Starting Chat Copilot Memory pipeline service, .NET Env: {0}, Log Level: {1}",
Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"),
app.Logger.GetLogLevelName());

app.Run();
Loading