Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c731f98
Update quota check script to list regions with available models and c…
Priyanka-Microsoft Mar 28, 2025
ee3b120
updated the script and documentation for the quota check
Priyanka-Microsoft Apr 1, 2025
5f2071a
removed / from thr doc
Priyanka-Microsoft Apr 1, 2025
30bd86d
updated image
Priyanka-Microsoft Apr 1, 2025
d44b384
updated script
Priyanka-Microsoft Apr 1, 2025
d0fb707
updated script
Priyanka-Microsoft Apr 1, 2025
b6b06d0
updated image
Priyanka-Microsoft Apr 1, 2025
66c0062
Update quota_check.md
Roopan-Microsoft Apr 1, 2025
3d9e987
Update quota_check.md
Roopan-Microsoft Apr 1, 2025
705b23b
Update quota_check.md
Roopan-Microsoft Apr 1, 2025
6fa8315
Update quota_check_params.sh
Roopan-Microsoft Apr 1, 2025
1649ceb
Merge pull request #327 from microsoft/fix/quota_check_script_update_…
Roopan-Microsoft Apr 1, 2025
ed4df08
error handling im provement in the script
Priyanka-Microsoft Apr 2, 2025
409bb7d
Merge pull request #344 from microsoft/fix/improvement-error-handling…
Roopan-Microsoft Apr 2, 2025
764dca5
add permission for quota_check_params.sh in dev container
Priyanka-Microsoft Apr 3, 2025
648f904
Merge pull request #346 from microsoft/fix/devcontainer-chmod-quota-s…
Roopan-Microsoft Apr 3, 2025
4b15079
create release pipeline added
AjitPadhi-Microsoft Apr 4, 2025
f450aa1
feat: create release pipeline added
Avijit-Microsoft Apr 4, 2025
fcb7a1e
fix in create release
AjitPadhi-Microsoft Apr 4, 2025
467bba1
fix: Minor fix in create release
Avijit-Microsoft Apr 4, 2025
720f552
docs: add PowerShell setup guide for Windows users
Harsh-Microsoft Apr 4, 2025
da0ceaa
Update README.md
Avijit-Microsoft Apr 4, 2025
b04c60c
Merge pull request #350 from microsoft/gh-issue-345
Avijit-Microsoft Apr 4, 2025
68230d0
Update azure.yaml to remove deployment section
Pavan-Microsoft Apr 8, 2025
4c92ba7
fix: remove parameters and the deployment section in azure.yaml
Avijit-Microsoft Apr 8, 2025
3233da8
Replace standard with globalstandard and updated quota check document
Priyanka-Microsoft Apr 8, 2025
da3c84f
commented out echo statement
Priyanka-Microsoft Apr 8, 2025
b34445b
added --verbose feature in script
Priyanka-Microsoft Apr 8, 2025
58e6d0e
default host plan change
Pavan-Microsoft Apr 9, 2025
0deccc5
install setuptools wheel in docker file
Pavan-Microsoft Apr 9, 2025
aed17d1
fix: Improve Deployment Process with Documentation and Hosting Plan U…
Avijit-Microsoft Apr 9, 2025
5807700
updated Readme
Priyanka-Microsoft Apr 14, 2025
d74e841
updated readme
Priyanka-Microsoft Apr 14, 2025
bf4b778
Update quota_check.md
Roopan-Microsoft Apr 14, 2025
a8113f4
Merge pull request #357 from microsoft/fix/replace-standard-with-glob…
Roopan-Microsoft Apr 14, 2025
c389b39
Update dependabot.yml
Harmanpreet-Microsoft Apr 15, 2025
e056ac4
Merge pull request #362 from microsoft/psl-DependabotPathUpdate
Roopan-Microsoft Apr 15, 2025
293d83f
Merge branch 'main' of https://github.com/microsoft/Conversation-Know…
Pavan-Microsoft Apr 16, 2025
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 .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
]
}
},
"postStartCommand": "git pull origin main && python3 -m pip install -r infra/scripts/index_scripts/requirements.txt",
"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",
"remoteUser": "vscode",
"hostRequirements": {
"memory": "4gb"
Expand Down
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ updates:
open-pull-requests-limit: 100

- package-ecosystem: "pip"
directory: "/App"
directory: "/src/api"
schedule:
interval: "monthly"
commit-message:
Expand All @@ -20,7 +20,7 @@ updates:
open-pull-requests-limit: 100

- package-ecosystem: "npm"
directory: "/App/frontend"
directory: "/src/App"
schedule:
interval: "monthly"
commit-message:
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: "Create Release"

on:
push:
branches: ["main"]

workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.sha }}

- uses: codfish/semantic-release-action@v3
id: semantic
with:
tag-format: 'v${version}'
additional-packages: |
['conventional-changelog-conventionalcommits@7']
plugins: |
[
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{ type: 'feat', section: 'Features', hidden: false },
{ type: 'fix', section: 'Bug Fixes', hidden: false },
{ type: 'perf', section: 'Performance Improvements', hidden: false },
{ type: 'revert', section: 'Reverts', hidden: false },
{ type: 'docs', section: 'Other Updates', hidden: false },
{ type: 'style', section: 'Other Updates', hidden: false },
{ type: 'chore', section: 'Other Updates', hidden: false },
{ type: 'refactor', section: 'Other Updates', hidden: false },
{ type: 'test', section: 'Other Updates', hidden: false },
{ type: 'build', section: 'Other Updates', hidden: false },
{ type: 'ci', section: 'Other Updates', hidden: false }
]
}
}
],
'@semantic-release/github'
]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- run: echo ${{ steps.semantic.outputs.release-version }}

- run: echo "$OUTPUTS"
env:
OUTPUTS: ${{ toJson(steps.semantic.outputs) }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ If you're not using one of the above options for opening the project, then you'l
* [Python 3.9+](https://www.python.org/downloads/)
* [Docker Desktop](https://www.docker.com/products/docker-desktop/)
* [Git](https://git-scm.com/downloads)
* [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.

2. Download the project code:

Expand Down
Binary file added docs/Images/git_bash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Images/quota-check-output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions docs/PowershellSetup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Add PowerShell 7 to PATH in Windows

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.

## Prerequisites

- 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).
- **Administrative privileges are not required** unless you're modifying system-wide environment variables. You can modify your **user-specific PATH** without admin rights.

## Steps to Add PowerShell 7 to PATH

### 1. Open **System Properties**
- Press `Win + X` and choose **System**.
- Click on **Advanced system settings** on the left sidebar. This will open the **System Properties** window.
- In the **System Properties** window, click on the **Environment Variables** button at the bottom.

### 2. Edit User Environment Variables
- In the **Environment Variables** window, under **User variables**, find the `Path` variable.
- Select the `Path` variable and click **Edit**. (If the `Path` variable doesn’t exist, click **New** and name it `Path`.)

### 3. Check if PowerShell 7 Path is Already in PATH
- Before adding the path, make sure the following path is not already present in the list:
```
C:\Program Files\PowerShell\7\
```
- If the path is already there, you don't need to add it again.

### 4. Add PowerShell 7 Path
- If the path is not already in the list, click **New** in the **Edit Environment Variable** window.
- Add the following path to the list:

```
C:\Program Files\PowerShell\7\
```

> **Note:** If you installed PowerShell 7 in a custom location, replace the above path with the correct one.

### 5. Save Changes
- After adding the path, click **OK** to close the **Edit Environment Variable** window.
- Click **OK** again to close the **Environment Variables** window.
- Finally, click **OK** to exit the **System Properties** window.

### 6. Verify PowerShell 7 in PATH
- Open **Command Prompt** or **Run** (press `Win + R`).
- Type `pwsh` and press Enter.
- If PowerShell 7 opens, you've successfully added it to your PATH!

---

## Troubleshooting

- **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.

- **Changes not taking effect:** Try restarting your computer or logging out and logging back in for the changes to apply.
110 changes: 79 additions & 31 deletions docs/quota_check.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,105 @@
## Check Quota Availability Before Deployment

Before deploying the accelerator, **ensure sufficient quota availability** for the required model.
Use one of the following scripts based on your needs:
Before deploying the accelerator, **ensure sufficient quota availability** for the required model.
> **We recommend increasing the capacity to 100k tokens for optimal performance.**

- **`quota_check_params.sh`** → If you **know the model and capacity** required.
- **`quota_check_all_regions.sh`** → If you **want to check available capacity across all regions** for supported models.
### Login if you have not done so already
```
azd auth login
```


### Login if you have not done so already
```
azd auth login
```

### 📌 Default Models & Capacities:
```
gpt-4o:30, gpt-4o-mini:30, gpt-4:30, text-embedding-ada-002:80
```
### 📌 Default Regions:
```
eastus, uksouth, eastus2, northcentralus, swedencentral, westus, westus2, southcentralus, canadacentral
```
### Usage Scenarios:
- No parameters passed → Default models and capacities will be checked in default regions.
- Only model(s) provided → The script will check for those models in the default regions.
- Only region(s) provided → The script will check default models in the specified regions.
- Both models and regions provided → The script will check those models in the specified regions.
- `--verbose` passed → Enables detailed logging output for debugging and traceability.

### **Input Formats**
> Use the --models, --regions, and --verbose options for parameter handling:

✔️ Run without parameters to check default models & regions without verbose logging:
```
./quota_check_params.sh
```
✔️ Enable verbose logging:
```
./quota_check_params.sh --verbose
```
✔️ Check specific model(s) in default regions:
```
./quota_check_params.sh --models gpt-4o:30,text-embedding-ada-002:80
```
✔️ Check default models in specific region(s):
```
./quota_check_params.sh --regions eastus,westus
```
✔️ Passing Both models and regions:
```
./quota_check_params.sh --models gpt-4o:30 --regions eastus,westus2
```
✔️ All parameters combined:
```
./quota_check_params.sh --models gpt-4:30,text-embedding-ada-002:80 --regions eastus,westus --verbose
```

### **Sample Output**
The final table lists regions with available quota. You can select any of these regions for deployment.

![quota-check-ouput](Images/quota-check-output.png)

---
## **If using Azure Portal and Cloud Shell**
### **If using Azure Portal and Cloud Shell**

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

**To check quota for a specific model and capacity:**
**To check quota for the deployment**

```sh
curl -L -o quota_check_params.sh "https://raw.githubusercontent.com/microsoft/Conversation-Knowledge-Mining-Solution-Accelerator/main/infra/scripts/quota_check_params.sh"
chmod +x quota_check_params.sh
./quota_check_params.sh <model_name:capacity> [<model_region>] (e.g., gpt-4o-mini:30,text-embedding-ada-002:20 eastus)
./quota_check_params.sh
```

**To check available quota across all regions for supported models:**

```sh
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"
chmod +x quota_check_all_regions.sh
./quota_check_all_regions.sh
- Refer to [Input Formats](#input-formats) for detailed commands.

### **If using VS Code or Codespaces**
1. Open the terminal in VS Code or Codespaces.
2. If you're using VS Code, click the dropdown on the right side of the terminal window, and select `Git Bash`.
![git_bash](Images/git_bash.png)
3. Navigate to the `scripts` folder where the script files are located and make the script as executable:
```sh
cd infra/scripts
chmod +x quota_check_params.sh
```

## **If using VS Code or Codespaces**

1. Run the appropriate script based on your requirement:
4. Run the appropriate script based on your requirement:

**To check quota for a specific model and capacity:**
**To check quota for the deployment**

```sh
./quota_check_params.sh <model_name:capacity> [<model_region>] (e.g., gpt-4o-mini:30,text-embedding-ada-002:20 eastus)
./quota_check_params.sh
```
- Refer to [Input Formats](#input-formats) for detailed commands.

**To check available quota across all regions for supported models:**

```sh
./quota_check_all_regions.sh
```
2. If you see the error `_bash: az: command not found_`, install Azure CLI:
5. If you see the error `_bash: az: command not found_`, install Azure CLI:

```sh
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
az login
```
3. Rerun the script after installing Azure CLI.

**Parameters**
- `<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**).
- `[<model_region>] (optional)`: The Azure region to check first. If not provided, all supported regions will be checked (**e.g., eastus**).
6. Rerun the script after installing Azure CLI.
4 changes: 2 additions & 2 deletions infra/scripts/checkquota_km.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ echo "✅ Azure subscription set successfully."

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

VALID_REGION=""
Expand Down
92 changes: 0 additions & 92 deletions infra/scripts/quota_check_all_regions.sh

This file was deleted.

Loading
Loading