|
| 1 | +### [Optional] Use your own resources in agent setup |
| 2 | + |
| 3 | +> [!NOTE] |
| 4 | +> If you use an existing AI Services/AOAI resource, no model will be deployed. You can deploy a model to the resource after the agent setup is complete. |
| 5 | +
|
| 6 | +#### Basic agent setup: use an existing AI Services or Azure OpenAI resource |
| 7 | + |
| 8 | +Replace the parameter value for `aiServiceAccountResourceId` with the full arm resource ID of the AI Services account you want to use. |
| 9 | + |
| 10 | +1. To get the AI Services account resource ID, sign in to the Azure CLI and select the subscription with your AI Services/AOAI account: |
| 11 | + |
| 12 | + ```az login``` |
| 13 | +2. Replace `<your-resource-group>` with the resource group containing your resource and `your-ai-service-resource-name` with the name of your AI Service resource, and run: |
| 14 | + |
| 15 | + ```az cognitiveservices account show --resource-group <your-resource-group> --name <your-ai-service-resource-name> --query "id" --output tsv``` |
| 16 | + |
| 17 | + The value returned is the `aiServiceAccountResourceId` you need to use in the template. |
| 18 | + |
| 19 | +3. In the basic agent template file, set the parameter: |
| 20 | + - aiServiceAccountResourceId:/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{serviceName} |
| 21 | + - [Azure OpenAI Resource Only] aiServiceKind: AzureOpenAI |
| 22 | + |
| 23 | + |
| 24 | + If you want to use an existing Azure OpenAI resource, you will need to update the `aiServiceAccountResourceId` and the `aiServiceKind` parameters in the parameter file. The aiServiceKind parameter should be set to AzureOpenAI. |
| 25 | + |
| 26 | +#### Standard agent setup: use an existing AI Services, storage, and/or Azure AI Search resource |
| 27 | + |
| 28 | +Use an existing AI Search, storage account, and/or Azure AI Search resource by providing the full arm resource ID in the standard agent template file. |
| 29 | + |
| 30 | +Use an existing AI Services resource: |
| 31 | +1. Follow the steps in basic agent setup to get the AI Services account resource ID. |
| 32 | +2. In the standard agent template file, set the parameter: |
| 33 | + - aiServiceAccountResourceId:/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{serviceName} |
| 34 | + |
| 35 | +Use an existing storage account: |
| 36 | +1. To get your storage account resource ID, sign in to the Azure CLI and select the subscription with your storage account: |
| 37 | + |
| 38 | + ```az login``` |
| 39 | +2. Then run the command: |
| 40 | + |
| 41 | + ```az search service show --resource-group <your-resource-group> --name <your-storage-account> --query "id" --output tsv``` |
| 42 | + |
| 43 | + The output is the `aiStorageAccountResourceID` you need to use in the template. |
| 44 | +3. In the standard agent template file, set the parameter: |
| 45 | + - aiStorageAccountResourceId:/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName} |
| 46 | + |
| 47 | +Use an existing Azure AI Search resource: |
| 48 | +1. To get your Azure AI Search resource ID, sign into Azure CLI and select the subscription with your search resource: |
| 49 | + |
| 50 | + ```az login``` |
| 51 | +2. Then run the command: |
| 52 | + |
| 53 | + ```az search service show --resource-group <your-resource-group> --name <your-search-service> --query "id" --output tsv``` |
| 54 | +3. In the standard agent template file, set the parameter: |
| 55 | + - aiSearchServiceResourceId:/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName} |
0 commit comments