Skip to content

Commit 88699ac

Browse files
Merge remote-tracking branch 'origin/main' into PSL-US-16594
2 parents 363a287 + 5fdd3e4 commit 88699ac

File tree

148 files changed

+6604
-446
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+6604
-446
lines changed

.github/workflows/docker-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ jobs:
6767
file: ./src/App/WebApp.Dockerfile
6868
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'dependabotchanges' }}
6969
tags: |
70-
${{ secrets.ACR_LOGIN_SERVER }}/km-app:${{ steps.determine_tag.outputs.tagname }}
71-
${{ secrets.ACR_LOGIN_SERVER }}/km-app:${{ steps.determine_tag.outputs.tagname }}_${{ steps.date.outputs.date }}_${{ github.run_number }}
70+
${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io' }}/km-app:${{ steps.determine_tag.outputs.tagname }}
71+
${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io' }}/km-app:${{ steps.determine_tag.outputs.tagname }}_${{ steps.date.outputs.date }}_${{ github.run_number }}
7272
7373
- name: Build and Push Docker Image for api
7474
uses: docker/build-push-action@v6
@@ -77,5 +77,5 @@ jobs:
7777
file: ./src/api/ApiApp.Dockerfile
7878
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'dependabotchanges' }}
7979
tags: |
80-
${{ secrets.ACR_LOGIN_SERVER }}/km-api:${{ steps.determine_tag.outputs.tagname }}
81-
${{ secrets.ACR_LOGIN_SERVER }}/km-api:${{ steps.determine_tag.outputs.tagname }}_${{ steps.date.outputs.date }}_${{ github.run_number }}
80+
${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io' }}/km-api:${{ steps.determine_tag.outputs.tagname }}
81+
${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io' }}/km-api:${{ steps.determine_tag.outputs.tagname }}_${{ steps.date.outputs.date }}_${{ github.run_number }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
33
################################################################################
44
*.venv
5+
*.myenv
56
*.vscode
67
*.vs
78
/LUISSchemaSerializationTool/.vs
@@ -10,3 +11,4 @@
1011
.fake
1112
.azure
1213
.idea
14+
/myenv

README.md

Lines changed: 117 additions & 215 deletions
Large diffs are not rendered by default.

azure.yaml

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -23,39 +23,4 @@ hooks:
2323
echo $WEB_APP_URL
2424
shell: sh
2525
continueOnError: false
26-
interactive: true
27-
# environment:
28-
# name: conversation-knowledge-mining-solution-accelerator
29-
# location: eastus
30-
31-
# metadata:
32-
# template: azd-init@1.11.1
33-
# services:
34-
# add-user-scripts:
35-
# project: Deployment/scripts/add_user_scripts
36-
# host: containerapp
37-
# language: python
38-
# app:
39-
# project: App
40-
# host: containerapp
41-
# language: python
42-
# fabric-scripts:
43-
# project: Deployment/scripts/fabric_scripts
44-
# host: containerapp
45-
# language: python
46-
# index-scripts:
47-
# project: Deployment/scripts/index_scripts
48-
# host: containerapp
49-
# language: python
50-
# km-charts-function:
51-
# project: AzureFunctions/km-charts-function
52-
# host: containerapp
53-
# language: python
54-
# docker:
55-
# path: Dockerfile
56-
# km-rag-function:
57-
# project: AzureFunctions/km-rag-function
58-
# host: containerapp
59-
# language: python
60-
# docker:
61-
# path: Dockerfile
26+
interactive: true

docs/AppAuthentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
![Add Details](Images/AddDetails.png)
3838

39-
5. After application is created sucessfully, then click on `Add a Redirect URL`.
39+
5. After application is created successfully, then click on `Add a Redirect URL`.
4040

4141
![Redirect URL](Images/AddRedirectURL.png)
4242

docs/CustomizingAzdParameters.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,46 @@
33
By default this template will use the environment name as the prefix to prevent naming collisions within Azure. The parameters below show the default values. You only need to run the statements below if you need to change the values.
44

55

6-
> To override any of the parameters, run `azd env set <key> <value>` before running `azd up`. On the first azd command, it will prompt you for the environment name. Be sure to choose 3-20 charaters alphanumeric unique name.
6+
> To override any of the parameters, run `azd env set <key> <value>` before running `azd up`. On the first azd command, it will prompt you for the environment name. Be sure to choose 3-20 characters alphanumeric unique name.
77
88
Change the Content Understanding Location (allowed values: Sweden Central, Australia East)
99

1010
```shell
11-
azd env set AZURE_ENV_CU_LOCATION 'swedencentral'
11+
azd env set AZURE_CONTENT_UNDERSTANDING_LOCATION 'swedencentral'
1212
```
1313

1414
Change the Secondary Location (example: eastus2, westus2, etc.)
1515

1616
```shell
17-
azd env set AZURE_ENV_SECONDARY_LOCATION eastus2
17+
azd env set AZURE_SECONDARY_LOCATION eastus2
1818
```
1919

2020
Change the Model Deployment Type (allowed values: Standard, GlobalStandard)
2121

2222
```shell
23-
azd env set AZURE_ENV_MODEL_DEPLOYMENT_TYPE GlobalStandard
23+
azd env set AZURE_OPEN_AI_MODEL_DEPLOYMENT_TYPE GlobalStandard
2424
```
2525

2626
Set the Model Name (allowed values: gpt-4o-mini, gpt-4o, gpt-4)
2727

2828
```shell
29-
azd env set AZURE_ENV_MODEL_NAME gpt-4o-mini
29+
azd env set AZURE_OPEN_AI_DEPLOYMENT_MODEL gpt-4o-mini
3030
```
3131

3232
Change the Model Capacity (choose a number based on available GPT model capacity in your subscription)
3333

3434
```shell
35-
azd env set AZURE_ENV_MODEL_CAPACITY 30
35+
azd env set AZURE_OPEN_AI_DEPLOYMENT_MODEL_CAPACITY 30
3636
```
3737

3838
Change the Embedding Model
3939

4040
```shell
41-
azd env set AZURE_ENV_EMBEDDING_MODEL_NAME text-embedding-ada-002
41+
azd env set AZURE_OPENAI_EMBEDDING_MODEL text-embedding-ada-002
4242
```
4343

4444
Change the Embedding Deployment Capacity (choose a number based on available embedding model capacity in your subscription)
4545

4646
```shell
47-
azd env set AZURE_ENV_EMBEDDING_MODEL_CAPACITY 80
47+
azd env set AZURE_OPENAI_EMBEDDING_MODEL_CAPACITY 80
4848
```

docs/DeploymentGuide.md

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
# Deployment Guide
2+
3+
## **Pre-requisites**
4+
5+
To deploy this solution, ensure you have access to an [Azure subscription](https://azure.microsoft.com/free/) with the necessary permissions to create **resource groups, resources, app registrations, and assign roles at the resource group level**. This should include Contributor role at the subscription level and Role Based Access Control (RBAC) permissions at the subscription and/or resource group level. Follow the steps in [Azure Account Set Up](./AzureAccountSetUp.md).
6+
7+
Check the [Azure Products by Region](https://azure.microsoft.com/en-us/explore/global-infrastructure/products-by-region/?products=all&regions=all) page and select a **region** where the following services are available:
8+
9+
- [Azure AI Foundry](https://learn.microsoft.com/en-us/azure/ai-foundry)
10+
- [Azure AI Content Understanding Service](https://learn.microsoft.com/en-us/azure/ai-services/content-understanding/)
11+
- [Azure OpenAI Service](https://learn.microsoft.com/en-us/azure/ai-services/openai/)
12+
- [GPT Model Capacity](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models)
13+
- [Azure AI Search](https://learn.microsoft.com/en-us/azure/search/search-what-is-azure-search)
14+
- [Azure SQL Database](https://learn.microsoft.com/en-us/azure/azure-sql/database/sql-database-paas-overview)
15+
- [Azure Cosmos DB](https://learn.microsoft.com/en-us/azure/cosmos-db/introduction)
16+
- [Azure Container Apps](https://learn.microsoft.com/en-us/azure/container-apps/)
17+
- [Azure Container Registry](https://learn.microsoft.com/en-us/azure/container-registry/)
18+
- [Embedding Deployment Capacity](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#embedding-models)
19+
- [Azure Semantic Search](./docs/AzureSemanticSearchRegion.md)
20+
21+
Here are some example regions where the services are available: East US, East US2, Australia East, UK South, France Central.
22+
23+
### **Important Note for PowerShell Users**
24+
25+
If you encounter issues running PowerShell scripts due to the policy of not being digitally signed, you can temporarily adjust the `ExecutionPolicy` by running the following command in an elevated PowerShell session:
26+
27+
```powershell
28+
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
29+
```
30+
31+
This will allow the scripts to run for the current session without permanently changing your system's policy.
32+
33+
## Deployment Options & Steps
34+
35+
Pick from the options below to see step-by-step instructions for GitHub Codespaces, VS Code Dev Containers, Local Environments, and Bicep deployments.
36+
37+
| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Conversation-Knowledge-Mining-Solution-Accelerator) | [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/Conversation-Knowledge-Mining-Solution-Accelerator) |
38+
|---|---|
39+
40+
<details>
41+
<summary><b>Deploy in GitHub Codespaces</b></summary>
42+
43+
### GitHub Codespaces
44+
45+
You can run this solution using GitHub Codespaces. The button will open a web-based VS Code instance in your browser:
46+
47+
1. Open the solution accelerator (this may take several minutes):
48+
49+
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Conversation-Knowledge-Mining-Solution-Accelerator)
50+
51+
2. Accept the default values on the create Codespaces page.
52+
3. Open a terminal window if it is not already open.
53+
4. Continue with the [deploying steps](#deploying-with-azd).
54+
55+
</details>
56+
57+
<details>
58+
<summary><b>Deploy in VS Code</b></summary>
59+
60+
### VS Code Dev Containers
61+
62+
You can run this solution in VS Code Dev Containers, which will open the project in your local VS Code using the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers):
63+
64+
1. Start Docker Desktop (install it if not already installed).
65+
2. Open the project:
66+
67+
[![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/Conversation-Knowledge-Mining-Solution-Accelerator)
68+
69+
3. In the VS Code window that opens, once the project files show up (this may take several minutes), open a terminal window.
70+
4. Continue with the [deploying steps](#deploying-with-azd).
71+
72+
</details>
73+
74+
<details>
75+
<summary><b>Deploy in your local Environment</b></summary>
76+
77+
### Local Environment
78+
79+
If you're not using one of the above options for opening the project, then you'll need to:
80+
81+
1. Make sure the following tools are installed:
82+
- [PowerShell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-7.5) <small>(v7.0+)</small> - available for Windows, macOS, and Linux.
83+
- [Azure Developer CLI (azd)](https://aka.ms/install-azd)
84+
- [Python 3.9+](https://www.python.org/downloads/)
85+
- [Docker Desktop](https://www.docker.com/products/docker-desktop/)
86+
- [Git](https://git-scm.com/downloads)
87+
88+
2. Clone the repository or download the project code via command-line:
89+
90+
```shell
91+
azd init -t microsoft/Conversation-Knowledge-Mining-Solution-Accelerator/
92+
```
93+
94+
3. Open the project folder in your terminal or editor.
95+
4. Continue with the [deploying steps](#deploying-with-azd).
96+
97+
</details>
98+
99+
<br/>
100+
101+
Consider the following settings during your deployment to modify specific settings:
102+
103+
<details>
104+
<summary><b>Configurable Deployment Settings</b></summary>
105+
106+
When you start the deployment, most parameters will have **default values**, but you can update the following settings:
107+
108+
| **Setting** | **Description** | **Default value** |
109+
|------------|----------------|------------|
110+
| **Azure Region** | The region where resources will be created. | eastus |
111+
| **Environment Name** | A **3-20 character alphanumeric value** used to generate a unique ID to prefix the resources. | kmtemplate |
112+
| **Azure AI Content Understanding Location** | Select from a drop-down list of values. | swedencentral |
113+
| **Secondary Location** | A **less busy** region for **Azure SQL and Azure Cosmos DB**, useful in case of availability constraints. | eastus2 |
114+
| **Deployment Type** | Select from a drop-down list. | GlobalStandard |
115+
| **GPT Model** | Choose from **gpt-4, gpt-4o, gpt-4o-mini** | gpt-4o-mini |
116+
| **GPT Model Deployment Capacity** | Configure capacity for **GPT models**. | 30k |
117+
| **Embedding Model** | Default: **text-embedding-ada-002**. | text-embedding-ada-002 |
118+
| **Embedding Model Capacity** | Set the capacity for **embedding models**. | 80k |
119+
120+
</details>
121+
122+
<details>
123+
<summary><b>[Optional] Quota Recommendations</b></summary>
124+
125+
By default, the **Gpt-4o-mini model capacity** in deployment is set to **30k tokens**, so we recommend updating the following:
126+
127+
> **For Global Standard | GPT-4o-mini - increase the capacity to at least 150k tokens post-deployment for optimal performance.**
128+
129+
Depending on your subscription quota and capacity, you can [adjust quota settings](AzureGPTQuotaSettings.md) to better meet your specific needs. You can also [adjust the deployment parameters](CustomizingAzdParameters.md) for additional optimization.
130+
131+
**⚠️ Warning:** Insufficient quota can cause deployment errors. Please ensure you have the recommended capacity or request additional capacity before deploying this solution.
132+
133+
</details>
134+
135+
### Deploying with AZD
136+
137+
Once you've opened the project in [Codespaces](#github-codespaces), [Dev Containers](#vs-code-dev-containers), or [locally](#local-environment), you can deploy it to Azure by following these steps:
138+
139+
1. Login to Azure:
140+
141+
```shell
142+
azd auth login
143+
```
144+
145+
#### To authenticate with Azure Developer CLI (`azd`), use the following command with your **Tenant ID**:
146+
147+
```sh
148+
azd auth login --tenant-id <tenant-id>
149+
```
150+
151+
2. Provision and deploy all the resources:
152+
153+
```shell
154+
azd up
155+
```
156+
157+
3. Provide an `azd` environment name (e.g., "ckmapp").
158+
4. Select a subscription from your Azure account and choose a location that has quota for all the resources.
159+
-- This deployment will take *7-10 minutes* to provision the resources in your account and set up the solution with sample data.
160+
- If you encounter an error or timeout during deployment, changing the location may help, as there could be availability constraints for the resources.
161+
162+
5. Once the deployment has completed successfully, open the [Azure Portal](https://portal.azure.com/), go to the deployed resource group, find the App Service, and get the app URL from `Default domain`.
163+
164+
6. If you are done trying out the application, you can delete the resources by running `azd down`.
165+
166+
### Publishing Local Build Container to Azure Container Registry
167+
168+
If you need to rebuild the source code and push the updated container to the deployed Azure Container Registry, follow these steps:
169+
170+
1. Set the environment variable `USE_LOCAL_BUILD` to `True`:
171+
172+
- **Linux/macOS**:
173+
```bash
174+
export USE_LOCAL_BUILD=True
175+
```
176+
177+
- **Windows (PowerShell)**:
178+
```powershell
179+
$env:USE_LOCAL_BUILD = $true
180+
```
181+
2. Run the `az login` command
182+
```bash
183+
az login
184+
```
185+
186+
3. Run the `azd up` command again to rebuild and push the updated container:
187+
```bash
188+
azd up
189+
```
190+
191+
This will rebuild the source code, package it into a container, and push it to the Azure Container Registry associated with your deployment.
192+
193+
## Post Deployment Steps
194+
195+
1. **Add App Authentication**
196+
197+
Follow steps in [App Authentication](./AppAuthentication.md) to configure authentication in app service. Note: Authentication changes can take up to 10 minutes
198+
199+
2. **Deleting Resources After a Failed Deployment**
200+
201+
- Follow steps in [Delete Resource Group](./DeleteResourceGroup.md) if your deployment fails and/or you need to clean up the resources.
202+
203+
## Sample Questions
204+
205+
To help you get started, here are some **Sample Questions** you can ask in the app:
206+
207+
- Total number of calls by date for the last 7 days
208+
- Show average handling time by topics in minutes
209+
- What are the top 7 challenges users reported?
210+
- Give a summary of billing issues
211+
- When customers call in about unexpected charges, what types of charges are they seeing?
212+
213+
These questions serve as a great starting point to explore insights from the data.

docs/Fabric_deployment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ If you'd like to customize the solution accelerator, here are some ways you migh
2424
7. Click Publish
2525
7. Retrieve Workspace ID from URL, refer to documentation additional assistance ([here](https://learn.microsoft.com/en-us/fabric/admin/portal-workspace#identify-your-workspace-id))
2626

27-
***Note: Wait until the Environment is finished publishing prior to proceeding witht the next steps.
27+
***Note: Wait until the Environment is finished publishing prior to proceeding with the next steps.
2828

2929
4. **Deploy Fabric resources and artifacts**
3030
1. Navigate to ([Azure Portal](https://portal.azure.com/))
@@ -40,7 +40,7 @@ If you'd like to customize the solution accelerator, here are some ways you migh
4040
3. solutionprefix_param - prefix used to append to lakehouse upon creation
4141
5. **Add App Authentication**
4242

43-
Follow steps in [App Authentication](./docs/AppAuthentication.md) to configure authenitcation in app service.
43+
Follow steps in [App Authentication](./docs/AppAuthentication.md) to configure authentication in app service.
4444

4545
### Upload additional files
4646

docs/Images/DeleteRG.png

-310 Bytes
Loading

docs/Images/deleteservices.png

-13.9 KB
Loading

0 commit comments

Comments
 (0)