Skip to content

Commit 46000c3

Browse files
2 parents 08bdd09 + c339a5a commit 46000c3

File tree

11 files changed

+391
-223
lines changed

11 files changed

+391
-223
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
]
1717
}
1818
},
19-
"postStartCommand": "git pull origin main && python3 -m pip install -r infra/scripts/index_scripts/requirements.txt",
19+
"postStartCommand": "git pull origin main && python3 -m pip install -r infra/scripts/index_scripts/requirements.txt && curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash && chmod +x ./infra/scripts/quota_check_params.sh",
2020
"remoteUser": "vscode",
2121
"hostRequirements": {
2222
"memory": "4gb"

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ updates:
1111
open-pull-requests-limit: 100
1212

1313
- package-ecosystem: "pip"
14-
directory: "/App"
14+
directory: "/src/api"
1515
schedule:
1616
interval: "monthly"
1717
commit-message:
@@ -20,7 +20,7 @@ updates:
2020
open-pull-requests-limit: 100
2121

2222
- package-ecosystem: "npm"
23-
directory: "/App/frontend"
23+
directory: "/src/App"
2424
schedule:
2525
interval: "monthly"
2626
commit-message:
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: "Create Release"
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
create-release:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.sha }}
21+
22+
- uses: codfish/semantic-release-action@v3
23+
id: semantic
24+
with:
25+
tag-format: 'v${version}'
26+
additional-packages: |
27+
['conventional-changelog-conventionalcommits@7']
28+
plugins: |
29+
[
30+
[
31+
"@semantic-release/commit-analyzer",
32+
{
33+
"preset": "conventionalcommits"
34+
}
35+
],
36+
[
37+
"@semantic-release/release-notes-generator",
38+
{
39+
"preset": "conventionalcommits",
40+
"presetConfig": {
41+
"types": [
42+
{ type: 'feat', section: 'Features', hidden: false },
43+
{ type: 'fix', section: 'Bug Fixes', hidden: false },
44+
{ type: 'perf', section: 'Performance Improvements', hidden: false },
45+
{ type: 'revert', section: 'Reverts', hidden: false },
46+
{ type: 'docs', section: 'Other Updates', hidden: false },
47+
{ type: 'style', section: 'Other Updates', hidden: false },
48+
{ type: 'chore', section: 'Other Updates', hidden: false },
49+
{ type: 'refactor', section: 'Other Updates', hidden: false },
50+
{ type: 'test', section: 'Other Updates', hidden: false },
51+
{ type: 'build', section: 'Other Updates', hidden: false },
52+
{ type: 'ci', section: 'Other Updates', hidden: false }
53+
]
54+
}
55+
}
56+
],
57+
'@semantic-release/github'
58+
]
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
62+
- run: echo ${{ steps.semantic.outputs.release-version }}
63+
64+
- run: echo "$OUTPUTS"
65+
env:
66+
OUTPUTS: ${{ toJson(steps.semantic.outputs) }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ If you're not using one of the above options for opening the project, then you'l
135135
* [Python 3.9+](https://www.python.org/downloads/)
136136
* [Docker Desktop](https://www.docker.com/products/docker-desktop/)
137137
* [Git](https://git-scm.com/downloads)
138+
* [Powershell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.5)<br/>Required for Windows users only. Follow the steps [here](./docs/PowershellSetup.md) to add it to the Windows PATH.
138139

139140
2. Download the project code:
140141

docs/Images/git_bash.png

29.3 KB
Loading

docs/Images/quota-check-output.png

12.6 KB
Loading

docs/PowershellSetup.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Add PowerShell 7 to PATH in Windows
2+
3+
This guide will help you add **PowerShell 7** (PowerShell Core) to your system’s PATH variable on Windows, so you can easily run it from any Command Prompt or Run dialog.
4+
5+
## Prerequisites
6+
7+
- You should have **PowerShell 7** installed on your machine. If you haven’t installed it yet, you can download it following the guide here: [Installing PowerShell on Windows | Microsoft Learn](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.5).
8+
- **Administrative privileges are not required** unless you're modifying system-wide environment variables. You can modify your **user-specific PATH** without admin rights.
9+
10+
## Steps to Add PowerShell 7 to PATH
11+
12+
### 1. Open **System Properties**
13+
- Press `Win + X` and choose **System**.
14+
- Click on **Advanced system settings** on the left sidebar. This will open the **System Properties** window.
15+
- In the **System Properties** window, click on the **Environment Variables** button at the bottom.
16+
17+
### 2. Edit User Environment Variables
18+
- In the **Environment Variables** window, under **User variables**, find the `Path` variable.
19+
- Select the `Path` variable and click **Edit**. (If the `Path` variable doesn’t exist, click **New** and name it `Path`.)
20+
21+
### 3. Check if PowerShell 7 Path is Already in PATH
22+
- Before adding the path, make sure the following path is not already present in the list:
23+
```
24+
C:\Program Files\PowerShell\7\
25+
```
26+
- If the path is already there, you don't need to add it again.
27+
28+
### 4. Add PowerShell 7 Path
29+
- If the path is not already in the list, click **New** in the **Edit Environment Variable** window.
30+
- Add the following path to the list:
31+
32+
```
33+
C:\Program Files\PowerShell\7\
34+
```
35+
36+
> **Note:** If you installed PowerShell 7 in a custom location, replace the above path with the correct one.
37+
38+
### 5. Save Changes
39+
- After adding the path, click **OK** to close the **Edit Environment Variable** window.
40+
- Click **OK** again to close the **Environment Variables** window.
41+
- Finally, click **OK** to exit the **System Properties** window.
42+
43+
### 6. Verify PowerShell 7 in PATH
44+
- Open **Command Prompt** or **Run** (press `Win + R`).
45+
- Type `pwsh` and press Enter.
46+
- If PowerShell 7 opens, you've successfully added it to your PATH!
47+
48+
---
49+
50+
## Troubleshooting
51+
52+
- **PowerShell 7 not opening:** Ensure the path to PowerShell 7 is entered correctly. If you're using a custom installation folder, check that the correct path is added to the `Path` variable.
53+
54+
- **Changes not taking effect:** Try restarting your computer or logging out and logging back in for the changes to apply.

docs/quota_check.md

Lines changed: 79 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,105 @@
11
## Check Quota Availability Before Deployment
22

3-
Before deploying the accelerator, **ensure sufficient quota availability** for the required model.
4-
Use one of the following scripts based on your needs:
3+
Before deploying the accelerator, **ensure sufficient quota availability** for the required model.
4+
> **We recommend increasing the capacity to 100k tokens for optimal performance.**
55
6-
- **`quota_check_params.sh`** → If you **know the model and capacity** required.
7-
- **`quota_check_all_regions.sh`** → If you **want to check available capacity across all regions** for supported models.
6+
### Login if you have not done so already
7+
```
8+
azd auth login
9+
```
10+
11+
12+
### Login if you have not done so already
13+
```
14+
azd auth login
15+
```
16+
17+
### 📌 Default Models & Capacities:
18+
```
19+
gpt-4o:30, gpt-4o-mini:30, gpt-4:30, text-embedding-ada-002:80
20+
```
21+
### 📌 Default Regions:
22+
```
23+
eastus, uksouth, eastus2, northcentralus, swedencentral, westus, westus2, southcentralus, canadacentral
24+
```
25+
### Usage Scenarios:
26+
- No parameters passed → Default models and capacities will be checked in default regions.
27+
- Only model(s) provided → The script will check for those models in the default regions.
28+
- Only region(s) provided → The script will check default models in the specified regions.
29+
- Both models and regions provided → The script will check those models in the specified regions.
30+
- `--verbose` passed → Enables detailed logging output for debugging and traceability.
31+
32+
### **Input Formats**
33+
> Use the --models, --regions, and --verbose options for parameter handling:
34+
35+
✔️ Run without parameters to check default models & regions without verbose logging:
36+
```
37+
./quota_check_params.sh
38+
```
39+
✔️ Enable verbose logging:
40+
```
41+
./quota_check_params.sh --verbose
42+
```
43+
✔️ Check specific model(s) in default regions:
44+
```
45+
./quota_check_params.sh --models gpt-4o:30,text-embedding-ada-002:80
46+
```
47+
✔️ Check default models in specific region(s):
48+
```
49+
./quota_check_params.sh --regions eastus,westus
50+
```
51+
✔️ Passing Both models and regions:
52+
```
53+
./quota_check_params.sh --models gpt-4o:30 --regions eastus,westus2
54+
```
55+
✔️ All parameters combined:
56+
```
57+
./quota_check_params.sh --models gpt-4:30,text-embedding-ada-002:80 --regions eastus,westus --verbose
58+
```
59+
60+
### **Sample Output**
61+
The final table lists regions with available quota. You can select any of these regions for deployment.
62+
63+
![quota-check-ouput](Images/quota-check-output.png)
864

965
---
10-
## **If using Azure Portal and Cloud Shell**
66+
### **If using Azure Portal and Cloud Shell**
1167

1268
1. Navigate to the [Azure Portal](https://portal.azure.com).
1369
2. Click on **Azure Cloud Shell** in the top right navigation menu.
1470
3. Run the appropriate command based on your requirement:
1571

16-
**To check quota for a specific model and capacity:**
72+
**To check quota for the deployment**
1773

1874
```sh
1975
curl -L -o quota_check_params.sh "https://raw.githubusercontent.com/microsoft/Conversation-Knowledge-Mining-Solution-Accelerator/main/infra/scripts/quota_check_params.sh"
2076
chmod +x quota_check_params.sh
21-
./quota_check_params.sh <model_name:capacity> [<model_region>] (e.g., gpt-4o-mini:30,text-embedding-ada-002:20 eastus)
77+
./quota_check_params.sh
2278
```
23-
24-
**To check available quota across all regions for supported models:**
25-
26-
```sh
27-
curl -L -o quota_check_all_regions.sh "https://raw.githubusercontent.com/microsoft/Conversation-Knowledge-Mining-Solution-Accelerator/main/infra/scripts/quota_check_all_regions.sh"
28-
chmod +x quota_check_all_regions.sh
29-
./quota_check_all_regions.sh
79+
- Refer to [Input Formats](#input-formats) for detailed commands.
80+
81+
### **If using VS Code or Codespaces**
82+
1. Open the terminal in VS Code or Codespaces.
83+
2. If you're using VS Code, click the dropdown on the right side of the terminal window, and select `Git Bash`.
84+
![git_bash](Images/git_bash.png)
85+
3. Navigate to the `scripts` folder where the script files are located and make the script as executable:
86+
```sh
87+
cd infra/scripts
88+
chmod +x quota_check_params.sh
3089
```
31-
32-
## **If using VS Code or Codespaces**
33-
34-
1. Run the appropriate script based on your requirement:
90+
4. Run the appropriate script based on your requirement:
3591
36-
**To check quota for a specific model and capacity:**
92+
**To check quota for the deployment**
3793
3894
```sh
39-
./quota_check_params.sh <model_name:capacity> [<model_region>] (e.g., gpt-4o-mini:30,text-embedding-ada-002:20 eastus)
95+
./quota_check_params.sh
4096
```
97+
- Refer to [Input Formats](#input-formats) for detailed commands.
4198
42-
**To check available quota across all regions for supported models:**
43-
44-
```sh
45-
./quota_check_all_regions.sh
46-
```
47-
2. If you see the error `_bash: az: command not found_`, install Azure CLI:
99+
5. If you see the error `_bash: az: command not found_`, install Azure CLI:
48100
49101
```sh
50102
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
51103
az login
52104
```
53-
3. Rerun the script after installing Azure CLI.
54-
55-
**Parameters**
56-
- `<model_name:capacity>`: The name and required capacity for each model, in the format model_name:capacity (**e.g., gpt-4o-mini:30,text-embedding-ada-002:20**).
57-
- `[<model_region>] (optional)`: The Azure region to check first. If not provided, all supported regions will be checked (**e.g., eastus**).
105+
6. Rerun the script after installing Azure CLI.

infra/scripts/checkquota_km.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ echo "✅ Azure subscription set successfully."
3232

3333
# Define models and their minimum required capacities
3434
declare -A MIN_CAPACITY=(
35-
["OpenAI.Standard.gpt-4o-mini"]=$GPT_MIN_CAPACITY #km generic
36-
["OpenAI.Standard.text-embedding-ada-002"]=$TEXT_EMBEDDING_MIN_CAPACITY #km generic
35+
["OpenAI.GlobalStandard.gpt-4o-mini"]=$GPT_MIN_CAPACITY #km generic
36+
["OpenAI.GlobalStandard.text-embedding-ada-002"]=$TEXT_EMBEDDING_MIN_CAPACITY #km generic
3737
)
3838

3939
VALID_REGION=""

infra/scripts/quota_check_all_regions.sh

Lines changed: 0 additions & 92 deletions
This file was deleted.

0 commit comments

Comments
 (0)