Skip to content

Commit

Permalink
Merge pull request #1658 from solliancenet/mg-fix-qs-byo-oai-c-p
Browse files Browse the repository at this point in the history
(0.8.1) Updating BYO OpenAI to reference correct instance
  • Loading branch information
ciprianjichici authored Sep 3, 2024
2 parents 3590962 + fc9cc61 commit 27f68c2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
AuthorizationAPI.json
AzureContentSafety.json
AzureEventGrid.json
CoreAPI.json
GatekeeperAPI.json
GatekeeperIntegrationAPI.json
GatewayAPI.json
Expand Down
8 changes: 0 additions & 8 deletions deploy/quick-start/azd-hooks/postprovision.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,6 @@ $configurations = @{
template = './data/resource-provider/FoundationaLLM.AIModel/completion-model.template.json'
render = '../common/data/resource-provider/FoundationaLLM.AIModel/completion-model.json'
}
"completion-4-model" = @{
template = './data/resource-provider/FoundationaLLM.AIModel/completion-4-model.template.json'
render = '../common/data/resource-provider/FoundationaLLM.AIModel/completion-4-model.json'
}
"completion-4o-model" = @{
template = './data/resource-provider/FoundationaLLM.AIModel/completion-4o-model.template.json'
render = '../common/data/resource-provider/FoundationaLLM.AIModel/completion-4o-model.json'
}
"embedding-model" = @{
template = './data/resource-provider/FoundationaLLM.AIModel/embedding-model.template.json'
render = '../common/data/resource-provider/FoundationaLLM.AIModel/embedding-model.json'
Expand Down
2 changes: 1 addition & 1 deletion deploy/quick-start/config/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "0.8.0"
"version": "0.8.1"
}
14 changes: 7 additions & 7 deletions deploy/quick-start/infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ var azureOpenAiEndpoint = deployOpenAi ? openAi.outputs.endpoint : customerOpenA
var azureOpenAiId = deployOpenAi ? openAi.outputs.id : customerOpenAi.id
var azureOpenAi = deployOpenAi ? openAiInstance : existingOpenAiInstance
var openAiInstance = {
name: openAi.outputs.name
name: '${abbrs.openAiAccounts}${resourceToken}'
resourceGroup: rg.name
subscriptionId: subscription().subscriptionId
}
Expand Down Expand Up @@ -363,11 +363,11 @@ module openAi './shared/openai.bicep' =
if (deployOpenAi) {
dependsOn: [keyVault]
name: 'openai-${timestamp}'
scope: rg
scope: resourceGroup(azureOpenAi.resourceGroup)

params: {
location: location
name: '${abbrs.openAiAccounts}${resourceToken}'
name: azureOpenAi.name
sku: 'S0'
tags: tags

Expand Down Expand Up @@ -613,10 +613,10 @@ module cosmosRoles './shared/sqlRoleAssignments.bicep' = [

module openAiRoles './shared/openAiRoleAssignments.bicep' = [
for target in openAiRoleTargets: {
scope: rg
scope: resourceGroup(azureOpenAi.resourceGroup)
name: '${target}-openai-roles-${timestamp}'
params: {
targetOpenAiName: openAiInstance.name
targetOpenAiName: azureOpenAi.name
principalId: acaServices[indexOf(serviceNames, target)].outputs.miPrincipalId
roleDefinitionNames: [
'Cognitive Services OpenAI User'
Expand All @@ -628,10 +628,10 @@ module openAiRoles './shared/openAiRoleAssignments.bicep' = [

module openAiContribRole './shared/openAiRoleAssignments.bicep' = [
for target in openAiContribRoleTargets: {
scope: rg
scope: resourceGroup(azureOpenAi.resourceGroup)
name: '${target}-openai-contrib-${timestamp}'
params: {
targetOpenAiName: openAiInstance.name
targetOpenAiName: azureOpenAi.name
principalId: acaServices[indexOf(serviceNames, target)].outputs.miPrincipalId
roleDefinitionNames: [
'Cognitive Services OpenAI Contributor'
Expand Down

0 comments on commit 27f68c2

Please sign in to comment.