Skip to content

Commit b0801da

Browse files
Fix for cognitive services API version (microsoft#508)
### Motivation and Context Fix for issue microsoft#425 The older API version was no longer working. It allows for deploying a new Azure OpenAI resource. ### Description Updates the API version and SKU of the Azure OpenAI ### Contribution Checklist - [x] The code builds clean without any errors or warnings - [x] The PR follows the [Contribution Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 --------- Co-authored-by: Gil LaHaye <[email protected]>
1 parent 8924709 commit b0801da

2 files changed

Lines changed: 29 additions & 25 deletions

File tree

‎scripts/deploy/main.bicep‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ var uniqueName = '${name}-${rgIdHash}'
9393
@description('Name of the Azure Storage file share to create')
9494
var storageFileShareName = 'aciqdrantshare'
9595

96-
resource openAI 'Microsoft.CognitiveServices/accounts@2022-12-01' = if (deployNewAzureOpenAI) {
96+
resource openAI 'Microsoft.CognitiveServices/accounts@2023-05-01' = if (deployNewAzureOpenAI) {
9797
name: 'ai-${uniqueName}'
9898
location: location
9999
kind: 'OpenAI'
@@ -105,31 +105,33 @@ resource openAI 'Microsoft.CognitiveServices/accounts@2022-12-01' = if (deployNe
105105
}
106106
}
107107

108-
resource openAI_completionModel 'Microsoft.CognitiveServices/accounts/deployments@2022-12-01' = if (deployNewAzureOpenAI) {
108+
resource openAI_completionModel 'Microsoft.CognitiveServices/accounts/deployments@2023-05-01' = if (deployNewAzureOpenAI) {
109109
parent: openAI
110110
name: completionModel
111+
sku: {
112+
name: 'Standard'
113+
capacity: 30
114+
}
111115
properties: {
112116
model: {
113117
format: 'OpenAI'
114118
name: completionModel
115119
}
116-
scaleSettings: {
117-
scaleType: 'Standard'
118-
}
119120
}
120121
}
121122

122-
resource openAI_embeddingModel 'Microsoft.CognitiveServices/accounts/deployments@2022-12-01' = if (deployNewAzureOpenAI) {
123+
resource openAI_embeddingModel 'Microsoft.CognitiveServices/accounts/deployments@2023-05-01' = if (deployNewAzureOpenAI) {
123124
parent: openAI
124125
name: embeddingModel
126+
sku: {
127+
name: 'Standard'
128+
capacity: 30
129+
}
125130
properties: {
126131
model: {
127132
format: 'OpenAI'
128133
name: embeddingModel
129134
}
130-
scaleSettings: {
131-
scaleType: 'Standard'
132-
}
133135
}
134136
dependsOn: [// This "dependency" is to create models sequentially because the resource
135137
openAI_completionModel // provider does not support parallel creation of models properly.

0 commit comments

Comments
 (0)