You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/agents/how-to/tools/azure-ai-search.md
+59-1Lines changed: 59 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,65 @@ If you already connected the AI Search resource that contains the index you want
62
62
- If you want the connection to use API Keys for authentication, copy one of the keys under **Manage admin keys**.
63
63
:::image type="content" source="../../media/tools/ai-search/acs-azure-portal.png" alt-text="A screenshot of an AI Search resource Keys tab in the Azure portal." lightbox="../../media/tools/ai-search/acs-azure-portal.png":::
##### Create an Azure AI Search project connection
66
+
67
+
**Azure CLI**
68
+
```azurecli
69
+
az ml connection create --file {connection.yml} --resource-group {my_resource_group} --workspace-name {my_hub_name}
70
+
```
71
+
72
+
You can use either an API key or credential-less YAML configuration file. For more information on the YAML configuration file, see the [Azure AI Search connection YAML schema](../../../machine-learning/reference-yaml-connection-ai-search.md):
73
+
- API Key example:
74
+
75
+
```yml
76
+
name: myazaics_apk
77
+
type: azure_ai_search
78
+
endpoint: https://contoso.search.windows.net/
79
+
api_key: XXXXXXXXXXXXXXX
80
+
```
81
+
82
+
- Credential-less
83
+
84
+
```yml
85
+
name: myazaics_ei
86
+
type: azure_ai_search
87
+
endpoint: https://contoso.search.windows.net/
88
+
```
89
+
90
+
**Python**
91
+
```python
92
+
from azure.ai.ml.entities import AzureAISearchConnection
93
+
94
+
# constrict an Azure AI Search connection
95
+
my_connection_name = "myaiservivce"
96
+
my_endpoint = "demo.endpoint" # this could also be called target
97
+
my_api_keys = None # leave blank for Authentication type = AAD
1. In Azure AI Foundry, navigate to the project you created in the agent setup. Click on **Open in management center**.
109
+
:::image type="content" source="../../media/tools/ai-search/project-studio.png" alt-text="A screenshot of a project in Azure AI Foundry." lightbox="../../media/tools/ai-search/project-studio.png":::
110
+
111
+
2. Click on the **Connections** tab and select **Add Connection**.
112
+
:::image type="content" source="../../media/tools/ai-search/project-connections-page.png" alt-text="A screenshot of the project connections page." lightbox="../../media/tools/ai-search/project-connections-page.png":::
113
+
114
+
3. Select **Azure AI Search**.
115
+
:::image type="content" source="../../media/tools/ai-search/select-acs.png" alt-text="A screenshot of the Azure AI Search connection type the user should select." lightbox="../../media/tools/ai-search/select-acs.png":::
116
+
117
+
4. Provide the required connection details for the Azure AI Search resource you want to use. Both Managed Identity and Key-based authentication are supported. Once all the fields are filled in, click **Add connection**.
118
+
:::image type="content" source="../../media/tools/ai-search/acs-connection-2.png" alt-text="A screenshot the required fields to add a new Azure AI Search connection." lightbox="../../media/tools/ai-search/acs-connection-2.png":::
119
+
120
+
5. Verify that the connection was successfully created and now appears in the project's Connections tab.
121
+
:::image type="content" source="../../media/tools/ai-search/success-acs-connection.png" alt-text="A screenshot of the project connections page with a new Azure AI Search connection added." lightbox="../../media/tools/ai-search/success-acs-connection.png":::
0 commit comments