This document describes how to customize the deployment of the Agents Chat with Microsoft Foundry. Once you follow the steps here, you can run azd up as described in the section below.
- Use existing resources
- Enabling and disabling resources provision
- Customizing resource names
- Customizing model deployments
Be default, this template provisions a new resource group along with other resources. If you already have provisioned Microsoft Foundry and Microsoft Foundry Project (not a hub based project), you might reuse these resources by setting:
To find the value:
- Open the azure portal
- Navigate to the AI foundry resource
- Select projects in the sidebar and open the desired project
- Oo to 'Resource Management' -> 'Properties' in the sidebar
- Copy the value from 'Resource ID'
azd env set AZURE_EXISTING_AIPROJECT_RESOURCE_ID "/subscriptions/<your-azure-subid>/resourceGroups/<your-rg>/providers/Microsoft.CognitiveServices/accounts/<your-ai-services-account-name>/projects/<your-project-name>"Notices that Application Insight and AI Search will not be created in this scenario.
By default, provisioning Application Insights is enabled, and AI Search is disabled. The default setting can be changed by:
- To enable AI Search, run
azd env set USE_AZURE_AI_SEARCH_SERVICE true - To disable Application Insights, run
azd env set USE_APPLICATION_INSIGHTS false
Once you disable these resources, they will not be deployed when you run azd up.
By default, this template will use a naming convention with unique strings to prevent naming collisions within Azure. To override default naming conventions, the following keys can be set:
AZURE_AIPROJECT_NAME- The name of the Microsoft Foundry projectAZURE_AISERVICES_NAME- The name of the Microsoft FoundryAZURE_STORAGE_ACCOUNT_NAME- The name of the Storage AccountAZURE_APPLICATION_INSIGHTS_NAME- The name of the Application Insights instanceAZURE_LOG_ANALYTICS_WORKSPACE_NAME- The name of the Log Analytics workspace used by Application Insights
To override any of those resource names, run azd env set <key> <value> before running azd up.
For more information on the Azure OpenAI models and non-Microsoft models that can be used in your deployment, view the list of models.
To customize the model deployments, you can set the following environment variables:
Change the chat model format (either OpenAI or Microsoft):
azd env set AZURE_AI_CHAT_MODEL_FORMAT MicrosoftChange the chat model name:
azd env set AZURE_AI_CHAT_MODEL_NAME gpt-4o-miniSet the version of the chat model:
azd env set AZURE_AI_CHAT_MODEL_VERSION 2024-07-18By default, this template sets the chat model deployment capacity to 80,000 tokens per minute. For AI Search, the embedding model requires a capacity of 50,000 tokens per minute. Due to current Bicep limitations, only the chat model quota is validated when you select a location during azd up. If you want to change these defaults, set the desired region using azd env set AZURE_LOCATION <region> (for example, eastus) to bypass quota validation. Follow the instructions below to update the model settings before running azd up.
Change the default capacity (in thousands of tokens per minute) of the chat deployment:
azd env set AZURE_AI_CHAT_DEPLOYMENT_CAPACITY 50Change the SKU of the chat deployment:
azd env set AZURE_AI_CHAT_DEPLOYMENT_SKU StandardChange the default capacity (in thousands of tokens per minute) of the embeddings deployment:
azd env set AZURE_AI_EMBED_DEPLOYMENT_CAPACITY 50Change the SKU of the embeddings deployment:
azd env set AZURE_AI_EMBED_DEPLOYMENT_SKU Standard