Skip to content

Commit 908e5a7

Browse files
Merge pull request #457 from microsoft/PSL-US-18442
fix: parameterized for model version
2 parents 502d2b7 + 47d1ac7 commit 908e5a7

File tree

4 files changed

+23
-17
lines changed

4 files changed

+23
-17
lines changed

infra/deploy_ai_foundry.bicep

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ param keyVaultName string
55
param cuLocation string
66
param deploymentType string
77
param gptModelName string
8+
param gptModelVersion string
89
param azureOpenAIApiVersion string
910
param gptDeploymentCapacity int
1011
param embeddingModel string
@@ -60,6 +61,7 @@ var aiModelDeployments = [
6061
name: deploymentType
6162
capacity: gptDeploymentCapacity
6263
}
64+
version: gptModelVersion
6365
raiPolicyName: 'Microsoft.Default'
6466
}
6567
{

infra/main.bicep

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,12 @@ param secondaryLocation string
3131
])
3232
param deploymentType string = 'GlobalStandard'
3333

34-
@minLength(1)
3534
@description('Name of the GPT model to deploy:')
36-
@allowed([
37-
'gpt-4o-mini'
38-
'gpt-4o'
39-
'gpt-4'
40-
])
4135
param gptModelName string = 'gpt-4o-mini'
4236

43-
// @minLength(1)
44-
// @description('Version of the GPT model to deploy:')
45-
// param gptModelVersion string = '2024-02-15-preview' //'2024-08-06'
37+
@description('Version of the GPT model to deploy:')
38+
param gptModelVersion string = '2024-07-18'
39+
4640
var azureOpenAIApiVersion = '2024-02-15-preview'
4741

4842
@minValue(10)
@@ -105,6 +99,7 @@ module aifoundry 'deploy_ai_foundry.bicep' = {
10599
cuLocation: contentUnderstandingLocation
106100
deploymentType: deploymentType
107101
gptModelName: gptModelName
102+
gptModelVersion: gptModelVersion
108103
azureOpenAIApiVersion: azureOpenAIApiVersion
109104
gptDeploymentCapacity: gptDeploymentCapacity
110105
embeddingModel: embeddingModel

infra/main.bicepparam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ param contentUnderstandingLocation = readEnvironmentVariable('AZURE_CONTENT_UNDE
66
param secondaryLocation = readEnvironmentVariable('AZURE_SECONDARY_LOCATION', 'eastus2')
77
param deploymentType = readEnvironmentVariable('AZURE_OPEN_AI_MODEL_DEPLOYMENT_TYPE', 'GlobalStandard')
88
param gptModelName = readEnvironmentVariable('AZURE_OPEN_AI_DEPLOYMENT_MODEL', 'gpt-4o-mini')
9+
param gptModelVersion = readEnvironmentVariable('AZURE_ENV_MODEL_VERSION', '2024-07-18')
910
param gptDeploymentCapacity = int(readEnvironmentVariable('AZURE_OPEN_AI_DEPLOYMENT_MODEL_CAPACITY', '30'))
1011
param embeddingModel = readEnvironmentVariable('AZURE_OPENAI_EMBEDDING_MODEL', 'text-embedding-ada-002')
1112
param embeddingDeploymentCapacity = int(readEnvironmentVariable('AZURE_OPENAI_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": "15074305105133532037"
8+
"templateHash": "17280998536631599018"
99
}
1010
},
1111
"parameters": {
@@ -53,16 +53,17 @@
5353
"gptModelName": {
5454
"type": "string",
5555
"defaultValue": "gpt-4o-mini",
56-
"allowedValues": [
57-
"gpt-4o-mini",
58-
"gpt-4o",
59-
"gpt-4"
60-
],
61-
"minLength": 1,
6256
"metadata": {
6357
"description": "Name of the GPT model to deploy:"
6458
}
6559
},
60+
"gptModelVersion": {
61+
"type": "string",
62+
"defaultValue": "2024-07-18",
63+
"metadata": {
64+
"description": "Version of the GPT model to deploy:"
65+
}
66+
},
6667
"gptDeploymentCapacity": {
6768
"type": "int",
6869
"defaultValue": 30,
@@ -589,6 +590,9 @@
589590
"gptModelName": {
590591
"value": "[parameters('gptModelName')]"
591592
},
593+
"gptModelVersion": {
594+
"value": "[parameters('gptModelVersion')]"
595+
},
592596
"azureOpenAIApiVersion": {
593597
"value": "[variables('azureOpenAIApiVersion')]"
594598
},
@@ -612,7 +616,7 @@
612616
"_generator": {
613617
"name": "bicep",
614618
"version": "0.35.1.17967",
615-
"templateHash": "5794496619234186044"
619+
"templateHash": "796973952642771216"
616620
}
617621
},
618622
"parameters": {
@@ -634,6 +638,9 @@
634638
"gptModelName": {
635639
"type": "string"
636640
},
641+
"gptModelVersion": {
642+
"type": "string"
643+
},
637644
"azureOpenAIApiVersion": {
638645
"type": "string"
639646
},
@@ -903,6 +910,7 @@
903910
"name": "[parameters('deploymentType')]",
904911
"capacity": "[parameters('gptDeploymentCapacity')]"
905912
},
913+
"version": "[parameters('gptModelVersion')]",
906914
"raiPolicyName": "Microsoft.Default"
907915
},
908916
{

0 commit comments

Comments
 (0)