Skip to content

Commit e348d84

Browse files
Merge branch 'byoc-researcher' of https://github.com/microsoft/Build-your-own-copilot-Solution-Accelerator into byoc-researcher
2 parents f7cfec9 + cc837b3 commit e348d84

File tree

10 files changed

+407
-42
lines changed

10 files changed

+407
-42
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ For additional training and support, please see:
6666
1. Please check the link [Azure Products by Region](
6767
https://azure.microsoft.com/en-us/explore/global-infrastructure/products-by-region/?products=all&regions=all) and choose a region where Azure AI Search, Semantic Ranker, Azure OpenAI Service, and Azure AI Foundry are available.
6868

69+
<br/>
70+
71+
> ⚠️ **Important: Check Azure OpenAI Quota Availability**
72+
<br/>To ensure sufficient quota is available in your subscription, please follow [quota check instructions guide](./docs/QuotaCheck.md) before you deploy the solution.
73+
74+
<br/>
75+
6976
2. Click the following deployment button to create the required resources for this accelerator in your Azure Subscription.
7077

7178
[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fmicrosoft%2FBuild-your-own-copilot-Solution-Accelerator%2Fbyoc-researcher%2Finfra%2Fbicep%2Fmain.json)

docs/QuotaCheck.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
## Check Quota Availability Before Deployment
2+
3+
Before deploying the accelerator, **ensure sufficient quota availability** for the required model.
4+
> **For Global Standard | GPT-35-turbo - increase the capacity to at least 50K tokens for optimal performance.**
5+
6+
### Login if you have not done so already
7+
```
8+
azd auth login
9+
```
10+
11+
12+
### 📌 Default Models & Capacities:
13+
```
14+
gpt-35-turbo:30, text-embedding-ada-002:45
15+
```
16+
### 📌 Default Regions:
17+
```
18+
australiaeast, francecentral, japaneast, northcentralus, southcentralus, westus, eastus, uksouth
19+
```
20+
### Usage Scenarios:
21+
- No parameters passed → Default models and capacities will be checked in default regions.
22+
- Only model(s) provided → The script will check for those models in the default regions.
23+
- Only region(s) provided → The script will check default models in the specified regions.
24+
- Both models and regions provided → The script will check those models in the specified regions.
25+
- `--verbose` passed → Enables detailed logging output for debugging and traceability.
26+
27+
### **Input Formats**
28+
> Use the --models, --regions, and --verbose options for parameter handling:
29+
30+
✔️ Run without parameters to check default models & regions without verbose logging:
31+
```
32+
./quota_check_params.sh
33+
```
34+
✔️ Enable verbose logging:
35+
```
36+
./quota_check_params.sh --verbose
37+
```
38+
✔️ Check specific model(s) in default regions:
39+
```
40+
./quota_check_params.sh --models gpt-35-turbo:30,text-embedding-ada-002:45
41+
```
42+
✔️ Check default models in specific region(s):
43+
```
44+
./quota_check_params.sh --regions eastus,westus
45+
```
46+
✔️ Passing Both models and regions:
47+
```
48+
./quota_check_params.sh --models gpt-35-turbo:30 --regions eastus,westus
49+
```
50+
✔️ All parameters combined:
51+
```
52+
./quota_check_params.sh --models gpt-35-turbo:30,text-embedding-ada-002:45 --regions eastus,westus --verbose
53+
```
54+
55+
### **Sample Output**
56+
The final table lists regions with available quota. You can select any of these regions for deployment.
57+
58+
![quota-check-ouput](images/readMe/quota-check-output.png)
59+
60+
---
61+
### **If using Azure Portal and Cloud Shell**
62+
63+
1. Navigate to the [Azure Portal](https://portal.azure.com).
64+
2. Click on **Azure Cloud Shell** in the top right navigation menu.
65+
3. Run the appropriate command based on your requirement:
66+
67+
**To check quota for the deployment**
68+
69+
```sh
70+
curl -L -o quota_check_params.sh "https://raw.githubusercontent.com/microsoft/Build-your-own-copilot-Solution-Accelerator/byoc-researcher/infra/scripts/quota_check_params.sh"
71+
chmod +x quota_check_params.sh
72+
./quota_check_params.sh
73+
```
74+
- Refer to [Input Formats](#input-formats) for detailed commands.
75+
76+
### **If using VS Code or Codespaces**
77+
1. Open the terminal in VS Code or Codespaces.
78+
2. If you're using VS Code, click the dropdown on the right side of the terminal window, and select `Git Bash`.
79+
![git_bash](images/git_bash.png)
80+
3. Navigate to the `scripts` folder where the script files are located and make the script as executable:
81+
```sh
82+
cd infra/scripts
83+
chmod +x quota_check_params.sh
84+
```
85+
4. Run the appropriate script based on your requirement:
86+
87+
**To check quota for the deployment**
88+
89+
```sh
90+
./quota_check_params.sh
91+
```
92+
- Refer to [Input Formats](#input-formats) for detailed commands.
93+
94+
5. If you see the error `_bash: az: command not found_`, install Azure CLI:
95+
96+
```sh
97+
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
98+
az login
99+
```
100+
6. Rerun the script after installing Azure CLI.

docs/images/git_bash.png

29.3 KB
Loading
12.6 KB
Loading

infra/bicep/deploy_azure_open_ai.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ resource accounts_byc_openai_name_text_embedding_ada_002 'Microsoft.CognitiveSer
4747
parent: accounts_byc_openai_name_resource
4848
name: 'text-embedding-ada-002'
4949
sku: {
50-
name: 'Standard'
50+
name: 'GlobalStandard'
5151
capacity: 45
5252
}
5353
properties: {

infra/bicep/deploy_keyvault.bicep

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ param enableForDiskEncryption bool = true
2929
@description('Enabled For Template Deployment. Property to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault.')
3030
param enableForTemplateDeployment bool = true
3131

32-
@description('Enable Purge Protection. Property specifying whether protection against purge is enabled for this vault.')
33-
param enablePurgeProtection bool = true
32+
// @description('Enable Purge Protection. Property specifying whether protection against purge is enabled for this vault.')
33+
// param enablePurgeProtection bool = false
3434

3535
@description('Enable RBAC Authorization. Property that controls how data actions are authorized.')
3636
param enableRBACAuthorization bool = true
3737

3838
@description('Enable Soft Delete. Property to specify whether the "soft delete" functionality is enabled for this key vault.')
39-
param enableSoftDelete bool = false
39+
param enableSoftDelete bool = true
4040

4141
@description('Soft Delete Retention in Days. softDelete data retention days. It accepts >=7 and <=90.')
42-
param softDeleteRetentionInDays int = 30
42+
param softDeleteRetentionInDays int = 7
4343

4444
@description('Public Network Access, Property to specify whether the vault will accept traffic from public internet.')
4545
@allowed([
@@ -117,7 +117,6 @@ resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
117117
enabledForDeployment: enableForDeployment
118118
enabledForDiskEncryption: enableForDiskEncryption
119119
enabledForTemplateDeployment: enableForTemplateDeployment
120-
enablePurgeProtection: enablePurgeProtection
121120
enableRbacAuthorization: enableRBACAuthorization
122121
enableSoftDelete: enableSoftDelete
123122
softDeleteRetentionInDays: softDeleteRetentionInDays

infra/bicep/main.bicep

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ var subscriptionId = subscription().subscriptionId
1616
var solutionLocation = resourceGroupLocation
1717
var baseUrl = 'https://raw.githubusercontent.com/microsoft/Build-your-own-copilot-Solution-Accelerator/byoc-researcher/'
1818

19+
// ========== Resource Group Tag ========== //
20+
resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
21+
name: 'default'
22+
properties: {
23+
tags: {
24+
TemplateName: 'Research Assistant'
25+
}
26+
}
27+
}
28+
1929
// ========== Managed Identity ========== //
2030
module managedIdentityModule 'deploy_managed_identity.bicep' = {
2131
name: 'deploy_managed_identity'
@@ -103,7 +113,7 @@ module keyvaultModule 'deploy_keyvault.bicep' = {
103113
cogServiceEndpoint:azAIMultiServiceAccount.outputs.cogSearchOutput.cogServiceEndpoint
104114
cogServiceName:azAIMultiServiceAccount.outputs.cogSearchOutput.cogServiceName
105115
cogServiceKey:azAIMultiServiceAccount.outputs.cogSearchOutput.cogServiceKey
106-
enableSoftDelete:false
116+
enableSoftDelete:true
107117
kvName:'${abbrs.security.keyVault}${solutionPrefix}'
108118
}
109119
scope: resourceGroup(resourceGroup().name)

infra/bicep/main.json

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"metadata": {
55
"_generator": {
66
"name": "bicep",
7-
"version": "0.33.93.31351",
8-
"templateHash": "11265523479637142038"
7+
"version": "0.36.177.2456",
8+
"templateHash": "5350056575239104697"
99
}
1010
},
1111
"parameters": {
@@ -254,6 +254,16 @@
254254
"baseUrl": "https://raw.githubusercontent.com/microsoft/Build-your-own-copilot-Solution-Accelerator/byoc-researcher/"
255255
},
256256
"resources": [
257+
{
258+
"type": "Microsoft.Resources/tags",
259+
"apiVersion": "2021-04-01",
260+
"name": "default",
261+
"properties": {
262+
"tags": {
263+
"TemplateName": "Research Assistant"
264+
}
265+
}
266+
},
257267
{
258268
"type": "Microsoft.Resources/deployments",
259269
"apiVersion": "2022-09-01",
@@ -281,8 +291,8 @@
281291
"metadata": {
282292
"_generator": {
283293
"name": "bicep",
284-
"version": "0.33.93.31351",
285-
"templateHash": "3549852852043024047"
294+
"version": "0.36.177.2456",
295+
"templateHash": "5332626978409423867"
286296
}
287297
},
288298
"parameters": {
@@ -375,8 +385,8 @@
375385
"metadata": {
376386
"_generator": {
377387
"name": "bicep",
378-
"version": "0.33.93.31351",
379-
"templateHash": "8889843082343700750"
388+
"version": "0.36.177.2456",
389+
"templateHash": "17058490450155567892"
380390
}
381391
},
382392
"parameters": {
@@ -530,8 +540,8 @@
530540
"metadata": {
531541
"_generator": {
532542
"name": "bicep",
533-
"version": "0.33.93.31351",
534-
"templateHash": "8677612668500685472"
543+
"version": "0.36.177.2456",
544+
"templateHash": "8150060114150668487"
535545
}
536546
},
537547
"parameters": {
@@ -614,8 +624,8 @@
614624
"metadata": {
615625
"_generator": {
616626
"name": "bicep",
617-
"version": "0.33.93.31351",
618-
"templateHash": "7933821472451505808"
627+
"version": "0.36.177.2456",
628+
"templateHash": "9833067354967795959"
619629
}
620630
},
621631
"parameters": {
@@ -704,8 +714,8 @@
704714
"metadata": {
705715
"_generator": {
706716
"name": "bicep",
707-
"version": "0.33.93.31351",
708-
"templateHash": "2542745894645743448"
717+
"version": "0.36.177.2456",
718+
"templateHash": "670869423023255449"
709719
}
710720
},
711721
"parameters": {
@@ -770,7 +780,7 @@
770780
"apiVersion": "2023-05-01",
771781
"name": "[format('{0}/{1}', parameters('accounts_byc_openai_name'), 'text-embedding-ada-002')]",
772782
"sku": {
773-
"name": "Standard",
783+
"name": "GlobalStandard",
774784
"capacity": 45
775785
},
776786
"properties": {
@@ -834,8 +844,8 @@
834844
"metadata": {
835845
"_generator": {
836846
"name": "bicep",
837-
"version": "0.33.93.31351",
838-
"templateHash": "11820826519517140279"
847+
"version": "0.36.177.2456",
848+
"templateHash": "7600099653925911474"
839849
}
840850
},
841851
"parameters": {
@@ -954,7 +964,7 @@
954964
"value": "[reference(resourceId('Microsoft.Resources/deployments', 'deploy_azure_ai_service'), '2022-09-01').outputs.cogSearchOutput.value.cogServiceKey]"
955965
},
956966
"enableSoftDelete": {
957-
"value": false
967+
"value": true
958968
},
959969
"kvName": {
960970
"value": "[format('{0}{1}', variables('abbrs').security.keyVault, parameters('solutionPrefix'))]"
@@ -966,8 +976,8 @@
966976
"metadata": {
967977
"_generator": {
968978
"name": "bicep",
969-
"version": "0.33.93.31351",
970-
"templateHash": "11754214044693385671"
979+
"version": "0.36.177.2456",
980+
"templateHash": "10856957659409783194"
971981
}
972982
},
973983
"parameters": {
@@ -1029,13 +1039,6 @@
10291039
"description": "Enabled For Template Deployment. Property to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault."
10301040
}
10311041
},
1032-
"enablePurgeProtection": {
1033-
"type": "bool",
1034-
"defaultValue": true,
1035-
"metadata": {
1036-
"description": "Enable Purge Protection. Property specifying whether protection against purge is enabled for this vault."
1037-
}
1038-
},
10391042
"enableRBACAuthorization": {
10401043
"type": "bool",
10411044
"defaultValue": true,
@@ -1045,14 +1048,14 @@
10451048
},
10461049
"enableSoftDelete": {
10471050
"type": "bool",
1048-
"defaultValue": false,
1051+
"defaultValue": true,
10491052
"metadata": {
10501053
"description": "Enable Soft Delete. Property to specify whether the \"soft delete\" functionality is enabled for this key vault."
10511054
}
10521055
},
10531056
"softDeleteRetentionInDays": {
10541057
"type": "int",
1055-
"defaultValue": 30,
1058+
"defaultValue": 7,
10561059
"metadata": {
10571060
"description": "Soft Delete Retention in Days. softDelete data retention days. It accepts >=7 and <=90."
10581061
}
@@ -1166,7 +1169,6 @@
11661169
"enabledForDeployment": "[parameters('enableForDeployment')]",
11671170
"enabledForDiskEncryption": "[parameters('enableForDiskEncryption')]",
11681171
"enabledForTemplateDeployment": "[parameters('enableForTemplateDeployment')]",
1169-
"enablePurgeProtection": "[parameters('enablePurgeProtection')]",
11701172
"enableRbacAuthorization": "[parameters('enableRBACAuthorization')]",
11711173
"enableSoftDelete": "[parameters('enableSoftDelete')]",
11721174
"softDeleteRetentionInDays": "[parameters('softDeleteRetentionInDays')]",
@@ -1428,8 +1430,8 @@
14281430
"metadata": {
14291431
"_generator": {
14301432
"name": "bicep",
1431-
"version": "0.33.93.31351",
1432-
"templateHash": "16955379019952955448"
1433+
"version": "0.36.177.2456",
1434+
"templateHash": "1868340155585734116"
14331435
}
14341436
},
14351437
"parameters": {
@@ -1517,8 +1519,8 @@
15171519
"metadata": {
15181520
"_generator": {
15191521
"name": "bicep",
1520-
"version": "0.33.93.31351",
1521-
"templateHash": "11770710119826170681"
1522+
"version": "0.36.177.2456",
1523+
"templateHash": "8680654928688163301"
15221524
}
15231525
},
15241526
"parameters": {
@@ -1733,8 +1735,8 @@
17331735
"metadata": {
17341736
"_generator": {
17351737
"name": "bicep",
1736-
"version": "0.33.93.31351",
1737-
"templateHash": "152810904339282293"
1738+
"version": "0.36.177.2456",
1739+
"templateHash": "243417282923124605"
17381740
}
17391741
},
17401742
"parameters": {

infra/scripts/checkquota.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ echo "✅ Azure subscription set successfully."
3333
# Define models and their minimum required capacities
3434
declare -A MIN_CAPACITY=(
3535
["OpenAI.Standard.gpt-35-turbo"]=$GPT_MIN_CAPACITY
36-
["OpenAI.Standard.text-embedding-ada-002"]=$TEXT_EMBEDDING_MIN_CAPACITY
36+
["OpenAI.GlobalStandard.text-embedding-ada-002"]=$TEXT_EMBEDDING_MIN_CAPACITY
3737
)
3838

3939
VALID_REGION=""

0 commit comments

Comments
 (0)