Skip to content

Commit

Permalink
Adding a variable for openai location (#2292)
Browse files Browse the repository at this point in the history
  • Loading branch information
pamelafox authored Jan 29, 2025
1 parent 051910b commit 46b49b0
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions .azdo/pipelines/azure-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ steps:
AZD_INITIAL_ENVIRONMENT_CONFIG: $(AZD_INITIAL_ENVIRONMENT_CONFIG)
AZURE_OPENAI_SERVICE: $(AZURE_OPENAI_SERVICE)
AZURE_OPENAI_API_VERSION: $(AZURE_OPENAI_API_VERSION)
AZURE_OPENAI_LOCATION: $(AZURE_OPENAI_LOCATION)
AZURE_OPENAI_RESOURCE_GROUP: $(AZURE_OPENAI_RESOURCE_GROUP)
AZURE_DOCUMENTINTELLIGENCE_SERVICE: $(AZURE_DOCUMENTINTELLIGENCE_SERVICE)
AZURE_DOCUMENTINTELLIGENCE_RESOURCE_GROUP: $(AZURE_DOCUMENTINTELLIGENCE_RESOURCE_GROUP)
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/azure-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
# project specific
AZURE_OPENAI_SERVICE: ${{ vars.AZURE_OPENAI_SERVICE }}
AZURE_OPENAI_LOCATION: ${{ vars.AZURE_OPENAI_LOCATION }}
AZURE_OPENAI_API_VERSION: ${{ vars.AZURE_OPENAI_API_VERSION }}
AZURE_OPENAI_RESOURCE_GROUP: ${{ vars.AZURE_OPENAI_RESOURCE_GROUP }}
AZURE_DOCUMENTINTELLIGENCE_SERVICE: ${{ vars.AZURE_DOCUMENTINTELLIGENCE_SERVICE }}
Expand Down
1 change: 1 addition & 0 deletions azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ pipeline:
- AZURE_OPENAI_SERVICE
- AZURE_OPENAI_API_VERSION
- AZURE_OPENAI_RESOURCE_GROUP
- AZURE_OPENAI_LOCATION
- AZURE_DOCUMENTINTELLIGENCE_SERVICE
- AZURE_DOCUMENTINTELLIGENCE_RESOURCE_GROUP
- AZURE_DOCUMENTINTELLIGENCE_SKU
Expand Down
1 change: 1 addition & 0 deletions docs/deploy_existing.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ You should set these values before running `azd up`. Once you've set them, retur

1. Run `azd env set AZURE_OPENAI_SERVICE {Name of existing OpenAI service}`
1. Run `azd env set AZURE_OPENAI_RESOURCE_GROUP {Name of existing resource group that OpenAI service is provisioned to}`
1. Run `azd env set AZURE_OPENAI_LOCATION {Location of existing OpenAI service}`
1. Run `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT {Name of existing chat deployment}`. Only needed if your chat deployment is not the default 'chat'.
1. Run `azd env set AZURE_OPENAI_CHATGPT_MODEL {Model name of existing chat deployment}`. Only needed if your chat model is not the default 'gpt-35-turbo'.
1. Run `azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT_VERSION {Version string for existing chat deployment}`. Only needed if your chat deployment model version is not the default '0613'. You definitely need to change this if you changed the model.
Expand Down
4 changes: 2 additions & 2 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ param chatHistoryContainerName string = 'chat-history'
type: 'location'
}
})
param openAiResourceGroupLocation string
param openAiLocation string

param openAiSkuName string = 'S0'

Expand Down Expand Up @@ -586,7 +586,7 @@ module openAi 'br/public:avm/res/cognitive-services/account:0.7.2' = if (isAzure
scope: openAiResourceGroup
params: {
name: !empty(openAiServiceName) ? openAiServiceName : '${abbrs.cognitiveServicesAccounts}${resourceToken}'
location: openAiResourceGroupLocation
location: openAiLocation
tags: tags
kind: 'OpenAI'
customSubDomainName: !empty(openAiServiceName)
Expand Down
3 changes: 3 additions & 0 deletions infra/main.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"openAiResourceGroupName": {
"value": "${AZURE_OPENAI_RESOURCE_GROUP}"
},
"openAiLocation": {
"value": "${AZURE_OPENAI_LOCATION}"
},
"openAiSkuName": {
"value": "S0"
},
Expand Down

0 comments on commit 46b49b0

Please sign in to comment.