Skip to content

Commit 1b305b8

Browse files
authored
fix: Login to Azure in post provision step if not already (#1022)
1 parent 3e0b75c commit 1b305b8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Welcome to the *Chat with your data* Solution accelerator repository! The *Chat
5252

5353
### About this repo
5454

55-
This repository provides an end-to-end solution for users who want to query their data with natural language. It includes a well designed ingestion mechanism for multiple file types, an easy deployment, and a support team for maintenance. The accelerator demonstrates both Push or Pull Ingestion; the choice of orchestration (Semantic Kernel, LangChain, OpenAI Functions or Prompt Flow) and should be the minimum components needed to implement a RAG pattern. It is not intended to be put into Production as-is without experimentation or evaluation of your data. It provides the following features:
55+
This repository provides an end-to-end solution for users who want to query their data with natural language. It includes a well designed ingestion mechanism for multiple file types, an easy deployment, and a support team for maintenance. The accelerator demonstrates both Push or Pull Ingestion; the choice of orchestration (Semantic Kernel, LangChain, OpenAI Functions or [Prompt Flow](docs/prompt_flow.md)) and should be the minimum components needed to implement a RAG pattern. It is not intended to be put into Production as-is without experimentation or evaluation of your data. It provides the following features:
5656

5757
* Chat with an Azure OpenAI model using your own data
5858
* Upload and process your documents

infra/prompt-flow/create-prompt-flow.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ while IFS='=' read -r key value; do
1111
case "$key" in
1212
"ORCHESTRATION_STRATEGY") orchestration_strategy=$value ;;
1313
"AZURE_SUBSCRIPTION_ID") subscription_id=$value ;;
14+
"AZURE_TENANT_ID") tenant_id=$value ;;
1415
"AZURE_RESOURCE_GROUP") resource_group=$value ;;
1516
"AZURE_ML_WORKSPACE_NAME") aml_workspace=$value ;;
1617
"RESOURCE_TOKEN") resource_token=$value ;;
@@ -63,6 +64,10 @@ sed -i "s@<aisearch_connection_id>@${connection_id_prefix}/aisearch_connection@g
6364
sed -i "s@<aisearch_endpoint>@${search_service}@g" "$flow_dag_file"
6465
sed -i "s@<aisearch_index>@${search_index}@g" "$flow_dag_file"
6566

67+
# login to Azure if not already logged in
68+
az account show > /dev/null 2>&1 || az login --tenant "$tenant_id"
69+
az account set --subscription "$subscription_id"
70+
6671
set +e
6772
tries=1
6873
pfazure flow create --subscription "$subscription_id" --resource-group "$resource_group" \

0 commit comments

Comments
 (0)