File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
sdk/ai/azure-ai-agents/samples Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 27
27
the "Models + endpoints" tab in your Azure AI Foundry project.
28
28
3) DEEP_RESEARCH_MODEL_DEPLOYMENT_NAME - The deployment name of the Deep Research AI model, as found under the "Name" column in
29
29
the "Models + endpoints" tab in your Azure AI Foundry project.
30
- 4) AZURE_BING_CONNECTION_ID - The ID of the Bing connection, in the format of:
31
- /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.MachineLearningServices/workspaces/{workspace-name}/connections/{connection-name}
30
+ 4) BING_RESOURCE_NAME - The resource name of the Bing connection, you can find it in the "Connected resources" tab
31
+ in the Management Center of your AI Foundry project.
32
32
"""
33
33
34
34
import asyncio
@@ -98,9 +98,11 @@ async def main() -> None:
98
98
credential = DefaultAzureCredential (),
99
99
)
100
100
101
+ bing_connection = await project_client .connections .get (name = os .environ ["BING_RESOURCE_NAME" ])
102
+
101
103
# Initialize a Deep Research tool with Bing Connection ID and Deep Research model deployment name
102
104
deep_research_tool = DeepResearchTool (
103
- bing_grounding_connection_id = os . environ [ "AZURE_BING_CONNECTION_ID" ] ,
105
+ bing_grounding_connection_id = bing_connection . id ,
104
106
deep_research_model = os .environ ["DEEP_RESEARCH_MODEL_DEPLOYMENT_NAME" ],
105
107
)
106
108
Original file line number Diff line number Diff line change 27
27
the "Models + endpoints" tab in your Azure AI Foundry project.
28
28
3) DEEP_RESEARCH_MODEL_DEPLOYMENT_NAME - The deployment name of the Deep Research AI model, as found under the "Name" column in
29
29
the "Models + endpoints" tab in your Azure AI Foundry project.
30
- 4) AZURE_BING_CONNECTION_ID - The ID of the Bing connection, in the format of:
31
- /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.MachineLearningServices/workspaces/{workspace-name}/connections/{connection-name}
30
+ 4) BING_RESOURCE_NAME - The resource name of the Bing connection, you can find it in the "Connected resources" tab
31
+ in the Management Center of your AI Foundry project.
32
32
"""
33
33
34
34
import os , time
@@ -93,7 +93,7 @@ def create_research_summary(
93
93
)
94
94
95
95
# [START create_agent_with_deep_research_tool]
96
- conn_id = os .environ ["AZURE_BING_CONNECTION_ID" ]
96
+ conn_id = project_client . connections . get ( name = os .environ ["BING_RESOURCE_NAME" ]). id
97
97
98
98
# Initialize a Deep Research tool with Bing Connection ID and Deep Research model deployment name
99
99
deep_research_tool = DeepResearchTool (
You can’t perform that action at this time.
0 commit comments