Skip to content

Commit be33d10

Browse files
committed
Bicep bug that broke OpenAi deployment. Fixed.
Signed-off-by: Paul Yuknewicz <[email protected]>
1 parent 906490b commit be33d10

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

infra/main.bicep

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ param environmentName string
77

88
@minLength(1)
99
@description('Primary location for all resources')
10-
@allowed(['australiaeast', 'eastasia', 'eastus', 'northeurope', 'southcentralus', 'southeastasia', 'uksouth', 'westus2'])
10+
@allowed(['australiaeast', 'eastasia', 'eastus', 'eastus2', 'northeurope', 'southcentralus', 'southeastasia', 'uksouth', 'westus2'])
1111
@metadata({
1212
azd: {
1313
type: 'location'
@@ -33,6 +33,7 @@ param openAiServiceName string = ''
3333
param openAiSkuName string
3434
@allowed([ 'azure', 'openai', 'azure_custom' ])
3535
param openAiHost string // Set in main.parameters.json
36+
param openAiApiVersion string = '2023-05-15'
3637

3738
param chatGptModelName string = ''
3839
param chatGptDeploymentName string = ''
@@ -42,7 +43,7 @@ param chatGptDeploymentCapacity int = 0
4243
var chatGpt = {
4344
modelName: !empty(chatGptModelName) ? chatGptModelName : startsWith(openAiHost, 'azure') ? 'gpt-35-turbo' : 'gpt-3.5-turbo'
4445
deploymentName: !empty(chatGptDeploymentName) ? chatGptDeploymentName : 'chat'
45-
deploymentVersion: !empty(chatGptDeploymentVersion) ? chatGptDeploymentVersion : '0613'
46+
deploymentVersion: !empty(chatGptDeploymentVersion) ? chatGptDeploymentVersion : '0125'
4647
deploymentCapacity: chatGptDeploymentCapacity != 0 ? chatGptDeploymentCapacity : 40
4748
}
4849

@@ -104,7 +105,7 @@ module api './app/api.bicep' = {
104105
identityId: apiUserAssignedIdentity.outputs.identityId
105106
identityClientId: apiUserAssignedIdentity.outputs.identityClientId
106107
appSettings: {
107-
OPENAI_API_VERSION: chatGpt.deploymentName
108+
OPENAI_API_VERSION: openAiApiVersion
108109
AZURE_OPENAI_CHATGPT_MODEL: chatGpt.modelName
109110
}
110111
virtualNetworkSubnetId: skipVnet ? '' : serviceVirtualNetwork.outputs.appSubnetID

infra/main.parameters.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,17 @@
2626
"openAiResourceGroupName": {
2727
"value": "${AZURE_OPENAI_RESOURCE_GROUP}"
2828
},
29+
"openAiApiVersion": {
30+
"value": "${OPENAI_API_VERSION=2023-05-15}"
31+
},
2932
"chatGptDeploymentName": {
3033
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT=chat}"
3134
},
3235
"chatGptDeploymentCapacity":{
3336
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT_CAPACITY}"
3437
},
3538
"chatGptDeploymentVersion":{
36-
"value": "${OPENAI_API_VERSION=2023-05-15}"
39+
"value": "${AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION}"
3740
},
3841
"chatGptModelName":{
3942
"value": "${AZURE_OPENAI_CHATGPT_MODEL=gpt-35-turbo}"

0 commit comments

Comments
 (0)