If you already have existing Azure resources, or if you want to specify the exact name of new Azure Resource, you can do so by setting azd
environment values.
You should set these values before running azd up
. Once you've set them, return to the deployment steps.
- Resource group
- OpenAI resource
- Azure AI Search resource
- Azure App Service Plan and App Service resources
- Azure Application Insights and related resources
- Azure Computer Vision resources
- Azure Document Intelligence resource
- Other Azure resources
- Run
azd env set AZURE_RESOURCE_GROUP {Name of existing resource group}
- Run
azd env set AZURE_LOCATION {Location of existing resource group}
- Run
azd env set AZURE_OPENAI_SERVICE {Name of existing OpenAI service}
- Run
azd env set AZURE_OPENAI_RESOURCE_GROUP {Name of existing resource group that OpenAI service is provisioned to}
- Run
azd env set AZURE_OPENAI_CHATGPT_DEPLOYMENT {Name of existing ChatGPT deployment}
. Only needed if your ChatGPT deployment is not the default 'chat'. - Run
azd env set AZURE_OPENAI_EMB_DEPLOYMENT {Name of existing GPT embedding deployment}
. Only needed if your embeddings deployment is not the default 'embedding'.
When you run azd up
after and are prompted to select a value for openAiResourceGroupLocation
, make sure to select the same location as the existing OpenAI resource group.
- Run
azd env set OPENAI_HOST openai
- Run
azd env set OPENAI_ORGANIZATION {Your OpenAI organization}
- Run
azd env set OPENAI_API_KEY {Your OpenAI API key}
- Run
azd up
You can retrieve your OpenAI key by checking your user page and your organization by navigating to your organization page. Learn more about creating an OpenAI free trial at this link. Do not check your key into source control.
When you run azd up
after and are prompted to select a value for openAiResourceGroupLocation
, you can select any location as it will not be used.
- Run
azd env set AZURE_SEARCH_SERVICE {Name of existing Azure AI Search service}
- Run
azd env set AZURE_SEARCH_SERVICE_RESOURCE_GROUP {Name of existing resource group with ACS service}
- If that resource group is in a different location than the one you'll pick for the
azd up
step, then runazd env set AZURE_SEARCH_SERVICE_LOCATION {Location of existing service}
- If the search service's SKU is not standard, then run
azd env set AZURE_SEARCH_SERVICE_SKU {Name of SKU}
. If you specify the free tier, then your app will no longer be able to use semantic ranker, and it will use keys instead of managed identity for accessing the search service. Be advised that search SKUs cannot be changed. (See other possible SKU values) - If you have an existing index that is set up with all the expected fields, then run
azd env set AZURE_SEARCH_INDEX {Name of existing index}
. Otherwise, theazd up
command will create a new index.
You can also customize the search service (new or existing) for non-English searches:
- To configure the language of the search query to a value other than "en-US", run
azd env set AZURE_SEARCH_QUERY_LANGUAGE {Name of query language}
. (See other possible values) - To turn off the spell checker, run
azd env set AZURE_SEARCH_QUERY_SPELLER none
. Consult this table to determine if spell checker is supported for your query language. - To configure the name of the analyzer to use for a searchable text field to a value other than "en.microsoft", run
azd env set AZURE_SEARCH_ANALYZER_NAME {Name of analyzer name}
. (See other possible values)
- Run
azd env set AZURE_APP_SERVICE_PLAN {Name of existing Azure App Service Plan}
- Run
azd env set AZURE_APP_SERVICE {Name of existing Azure App Service}
. - Run
azd env set AZURE_APP_SERVICE_SKU {SKU of Azure App Service, defaults to B1}
.
- Run
azd env set AZURE_APPLICATION_INSIGHTS {Name of existing Azure App Insights}
. - Run
azd env set AZURE_APPLICATION_INSIGHTS_DASHBOARD {Name of existing Azure App Insights Dashboard}
. - Run
azd env set AZURE_LOG_ANALYTICS {Name of existing Azure Log Analytics Workspace Name}
.
- Run
azd env set AZURE_COMPUTER_VISION_SERVICE {Name of existing Azure Computer Vision Service Name}
- Run
azd env set AZURE_COMPUTER_VISION_RESOURCE_GROUP {Name of existing Azure Computer Vision Resource Group Name}
- Run
azd env set AZURE_COMPUTER_VISION_LOCATION {Name of existing Azure Computer Vision Location}
- Run
azd env set AZURE_COMPUTER_VISION_SKU {SKU of Azure Computer Vision service, defaults to F0}
In order to support analysis of many document formats, this repository uses a preview version of Azure Document Intelligence (formerly Form Recognizer) that is only available in limited regions. If your existing resource is in one of those regions, then you can re-use it by setting the following environment variables:
- Run
azd env set AZURE_DOCUMENTINTELLIGENCE_SERVICE {Name of existing Azure AI Document Intelligence service}
- Run
azd env set AZURE_DOCUMENTINTELLIGENCE_LOCATION {Location of existing service}
- Run
azd env set AZURE_DOCUMENTINTELLIGENCE_RESOURCE_GROUP {Name of resource group with existing service, defaults to main resource group}
- Run
azd env set AZURE_DOCUMENTINTELLIGENCE_SKU {SKU of existing service, defaults to S0}
You can also use existing Azure AI Storage Accounts. See ./infra/main.parameters.json
for list of environment variables to pass to azd env set
to configure those existing resources.