From f0a09d1ef04fa9b4a6037bfa72d3b49d7cfebef9 Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Thu, 15 Jun 2023 14:04:51 -0700 Subject: [PATCH 1/2] Configure Azure Developer Pipeline From a925aa542cbc2f65b13dd0d087219683104ab5e0 Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Thu, 15 Jun 2023 16:40:33 -0700 Subject: [PATCH 2/2] Update to latest OpenAI version --- infra/core/ai/cognitiveservices.bicep | 11 +++++++---- infra/main.bicep | 5 ++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/infra/core/ai/cognitiveservices.bicep b/infra/core/ai/cognitiveservices.bicep index 9d3a423..821cf60 100644 --- a/infra/core/ai/cognitiveservices.bicep +++ b/infra/core/ai/cognitiveservices.bicep @@ -1,7 +1,7 @@ param name string param location string = resourceGroup().location param tags object = {} -@description('The custom subdomain name used to access the API. Defaults to the value of the name parameter.') + param customSubDomainName string = name param deployments array = [] param kind string = 'OpenAI' @@ -10,7 +10,7 @@ param sku object = { name: 'S0' } -resource account 'Microsoft.CognitiveServices/accounts@2022-10-01' = { +resource account 'Microsoft.CognitiveServices/accounts@2023-05-01' = { name: name location: location tags: tags @@ -23,13 +23,16 @@ resource account 'Microsoft.CognitiveServices/accounts@2022-10-01' = { } @batchSize(1) -resource deployment 'Microsoft.CognitiveServices/accounts/deployments@2022-10-01' = [for deployment in deployments: { +resource deployment 'Microsoft.CognitiveServices/accounts/deployments@2023-05-01' = [for deployment in deployments: { parent: account name: deployment.name properties: { model: deployment.model raiPolicyName: contains(deployment, 'raiPolicyName') ? deployment.raiPolicyName : null - scaleSettings: deployment.scaleSettings + } + sku: { + name: 'Standard' + capacity: deployment.capacity } }] diff --git a/infra/main.bicep b/infra/main.bicep index ddfb04e..ad43eae 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -18,6 +18,7 @@ param openAiResourceName string = '' param openAiResourceGroupName string = '' param openAiResourceGroupLocation string = '' param openAiSkuName string = '' +param openAiDeploymentCapacity int = 30 var resourceToken = toLower(uniqueString(subscription().id, name, location)) var tags = { 'azd-env-name': name } @@ -53,9 +54,7 @@ module openAi 'core/ai/cognitiveservices.bicep' = { name: 'gpt-35-turbo' version: '0301' } - scaleSettings: { - scaleType: 'Standard' - } + capacity: openAiDeploymentCapacity } ] }