Skip to content

fix: Login to Azure in post provision step if not already #1022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Welcome to the *Chat with your data* Solution accelerator repository! The *Chat

### About this repo

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:
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:

* Chat with an Azure OpenAI model using your own data
* Upload and process your documents
Expand Down
5 changes: 5 additions & 0 deletions infra/prompt-flow/create-prompt-flow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ while IFS='=' read -r key value; do
case "$key" in
"ORCHESTRATION_STRATEGY") orchestration_strategy=$value ;;
"AZURE_SUBSCRIPTION_ID") subscription_id=$value ;;
"AZURE_TENANT_ID") tenant_id=$value ;;
"AZURE_RESOURCE_GROUP") resource_group=$value ;;
"AZURE_ML_WORKSPACE_NAME") aml_workspace=$value ;;
"RESOURCE_TOKEN") resource_token=$value ;;
Expand Down Expand Up @@ -63,6 +64,10 @@ sed -i "s@<aisearch_connection_id>@${connection_id_prefix}/aisearch_connection@g
sed -i "s@<aisearch_endpoint>@${search_service}@g" "$flow_dag_file"
sed -i "s@<aisearch_index>@${search_index}@g" "$flow_dag_file"

# login to Azure if not already logged in
az account show > /dev/null 2>&1 || az login --tenant "$tenant_id"
az account set --subscription "$subscription_id"

set +e
tries=1
pfazure flow create --subscription "$subscription_id" --resource-group "$resource_group" \
Expand Down
Loading