Skip to content

Commit c2699e6

Browse files
Merge pull request #455 from microsoft/PSL-18442
fix: parameterized for model version
2 parents 3b2bd3c + 486df05 commit c2699e6

File tree

4 files changed

+23
-14
lines changed

4 files changed

+23
-14
lines changed

infra/deploy_ai_foundry.bicep

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ param solutionLocation string
44
param keyVaultName string
55
param deploymentType string
66
param gptModelName string
7+
param gptModelVersion string
78
param azureOpenaiAPIVersion string
89
param gptDeploymentCapacity int
910
param embeddingModel string
@@ -42,7 +43,7 @@ var aiModelDeployments = [
4243
name: deploymentType
4344
capacity: gptDeploymentCapacity
4445
}
45-
version: '2024-05-13'
46+
version: gptModelVersion
4647
raiPolicyName: 'Microsoft.Default'
4748
}
4849
{

infra/main.bicep

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,12 @@ param secondaryLocation string
2525
])
2626
param deploymentType string = 'GlobalStandard'
2727

28-
@minLength(1)
2928
@description('Name of the GPT model to deploy:')
30-
@allowed([
31-
'gpt-4o'
32-
'gpt-4'
33-
])
3429
param gptModelName string = 'gpt-4o'
3530

31+
@description('Version of the GPT model to deploy:')
32+
param gptModelVersion string = '2024-05-13'
33+
3634
param azureOpenaiAPIVersion string = '2024-05-01-preview'
3735

3836
@minValue(10)
@@ -106,6 +104,7 @@ module aifoundry 'deploy_ai_foundry.bicep' = {
106104
keyVaultName: kvault.outputs.keyvaultName
107105
deploymentType: deploymentType
108106
gptModelName: gptModelName
107+
gptModelVersion: gptModelVersion
109108
azureOpenaiAPIVersion: azureOpenaiAPIVersion
110109
gptDeploymentCapacity: gptDeploymentCapacity
111110
embeddingModel: embeddingModel

infra/main.bicepparam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ param environmentName = readEnvironmentVariable('AZURE_ENV_NAME', 'env_name')
55
param secondaryLocation = readEnvironmentVariable('AZURE_ENV_SECONDARY_LOCATION', 'eastus2')
66
param deploymentType = readEnvironmentVariable('AZURE_ENV_MODEL_DEPLOYMENT_TYPE', 'GlobalStandard')
77
param gptModelName = readEnvironmentVariable('AZURE_ENV_MODEL_NAME', 'gpt-4o')
8+
param gptModelVersion = readEnvironmentVariable('AZURE_ENV_MODEL_VERSION', '2024-05-13')
89
param gptDeploymentCapacity = int(readEnvironmentVariable('AZURE_ENV_MODEL_CAPACITY', '30'))
910

1011
param embeddingDeploymentCapacity = int(readEnvironmentVariable('AZURE_ENV_EMBEDDING_MODEL_CAPACITY', '80'))

infra/main.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"_generator": {
66
"name": "bicep",
77
"version": "0.35.1.17967",
8-
"templateHash": "6972576500861957783"
8+
"templateHash": "3433053339326968482"
99
}
1010
},
1111
"parameters": {
@@ -42,15 +42,17 @@
4242
"gptModelName": {
4343
"type": "string",
4444
"defaultValue": "gpt-4o",
45-
"allowedValues": [
46-
"gpt-4o",
47-
"gpt-4"
48-
],
49-
"minLength": 1,
5045
"metadata": {
5146
"description": "Name of the GPT model to deploy:"
5247
}
5348
},
49+
"gptModelVersion": {
50+
"type": "string",
51+
"defaultValue": "2024-05-13",
52+
"metadata": {
53+
"description": "Version of the GPT model to deploy:"
54+
}
55+
},
5456
"azureOpenaiAPIVersion": {
5557
"type": "string",
5658
"defaultValue": "2024-05-01-preview"
@@ -571,6 +573,9 @@
571573
"gptModelName": {
572574
"value": "[parameters('gptModelName')]"
573575
},
576+
"gptModelVersion": {
577+
"value": "[parameters('gptModelVersion')]"
578+
},
574579
"azureOpenaiAPIVersion": {
575580
"value": "[parameters('azureOpenaiAPIVersion')]"
576581
},
@@ -597,7 +602,7 @@
597602
"_generator": {
598603
"name": "bicep",
599604
"version": "0.35.1.17967",
600-
"templateHash": "10562656740645209068"
605+
"templateHash": "3118038315112495212"
601606
}
602607
},
603608
"parameters": {
@@ -616,6 +621,9 @@
616621
"gptModelName": {
617622
"type": "string"
618623
},
624+
"gptModelVersion": {
625+
"type": "string"
626+
},
619627
"azureOpenaiAPIVersion": {
620628
"type": "string"
621629
},
@@ -890,7 +898,7 @@
890898
"name": "[parameters('deploymentType')]",
891899
"capacity": "[parameters('gptDeploymentCapacity')]"
892900
},
893-
"version": "2024-05-13",
901+
"version": "[parameters('gptModelVersion')]",
894902
"raiPolicyName": "Microsoft.Default"
895903
},
896904
{

0 commit comments

Comments
 (0)