Skip to content

Commit

Permalink
Add OpenAI subscription parameter to deployment configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
guybartal committed Jan 7, 2025
1 parent 900c503 commit b39d2ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion infra/deploy.parameters.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"GRAPHRAG_OPENAI_SUBSCRIPTION": "__GRAPHRAG_OPENAI_SUBSCRIPTION__",
"GRAPHRAG_API_BASE": "__GRAPHRAG_API_BASE__",
"GRAPHRAG_API_VERSION": "__GRAPHRAG_API_VERSION__",
"GRAPHRAG_EMBEDDING_DEPLOYMENT_NAME": "__GRAPHRAG_EMBEDDING_DEPLOYMENT_NAME__",
Expand All @@ -7,4 +8,4 @@
"GRAPHRAG_LLM_MODEL": "__GRAPHRAG_LLM_MODEL__",
"LOCATION": "__LOCATION__",
"RESOURCE_GROUP": "__RESOURCE_GROUP__"
}
}
2 changes: 1 addition & 1 deletion infra/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ assignAOAIRoleToManagedIdentity() {
printf "Assigning 'Cognitive Services OpenAI Contributor' role to managed identity... "
local servicePrincipalId=$(jq -r .azure_workload_identity_principal_id.value <<< $AZURE_OUTPUTS)
exitIfValueEmpty "$servicePrincipalId" "Unable to parse service principal id from azure outputs, exiting..."
local scope=$(az cognitiveservices account list --query "[?contains(properties.endpoint, '$GRAPHRAG_API_BASE')] | [0].id" -o tsv)
local scope=$(az cognitiveservices account list --subscription $GRAPHRAG_OPENAI_SUBSCRIPTION --query "[?contains(properties.endpoint, '$GRAPHRAG_API_BASE')] | [0].id" -o tsv)
az role assignment create --only-show-errors \
--role "Cognitive Services OpenAI Contributor" \
--assignee "$servicePrincipalId" \
Expand Down

0 comments on commit b39d2ff

Please sign in to comment.