Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions labs/ai-agent-service/ai-agent-service-v2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,8 @@
")\n",
"agents_client = project_client.agents\n",
"\n",
"bing_connection = project_client.connections.get(name='bingSearch-connection')\n",
"conn_id = bing_connection.id\n",
"\n",
"# Initialize agent bing tool and add the connection id\n",
"bing = BingGroundingTool(connection_id=conn_id)\n",
"bing = BingGroundingTool(connection_id=bing_search_connection_id)\n",
"\n",
"# Create agent with the bing tool and process assistant run\n",
"with project_client:\n",
Expand Down Expand Up @@ -571,7 +568,7 @@
" model=str(models_config[0].get('name')), # Specify the model deployment\n",
" name=\"my-orders-agent\", # Give the agent a name\n",
" instructions=\"You are a helpful sales assistant that helps users order products. Recover from errors if any and place multiple orders if needed.\",\n",
" tools=openapi_tool.definitions, # Provide the list of tool definitions\n",
" tools=openapi_tools.definitions, # Provide the list of tool definitions\n",
" )\n",
" print(f\"Created agent, ID: {agent.id}\")\n",
" # </agent_creation>\n",
Expand Down
8 changes: 4 additions & 4 deletions labs/ai-agent-service/main-v2.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -492,11 +492,11 @@ output apimSubscriptions array = apimModule.outputs.apimSubscriptions

output foundryProjectEndpoint string = foundryModule.outputs.extendedAIServicesConfig[0].foundryProjectEndpoint

output bingSearchConnectionId string = '/subscriptions/${subscription().subscriptionId}/resourceGroups/${resourceGroup().name}/providers/Microsoft.CognitiveServices/accounts/${foundryModule.outputs.extendedAIServicesConfig[0].cognitiveServiceName}/projects/${foundryProjectName}/connections/${bingSearchConnection.name}'
output bingSearchConnectionId string = '${foundryModule.outputs.extendedAIServicesConfig[0].foundryProjectId}/connections/${bingSearchConnection.name}'

output weatherAPIConnectionId string = '/subscriptions/${subscription().subscriptionId}/resourceGroups/${resourceGroup().name}/providers/Microsoft.CognitiveServices/accounts/${foundryModule.outputs.extendedAIServicesConfig[0].cognitiveServiceName}/projects/${foundryProjectName}/connections/${weatherAPIConnection.name}'
output weatherAPIConnectionId string = '${foundryModule.outputs.extendedAIServicesConfig[0].foundryProjectId}/connections/${weatherAPIConnection.name}'

output placeOrderAPIConnectionId string = '/subscriptions/${subscription().subscriptionId}/resourceGroups/${resourceGroup().name}/providers/Microsoft.CognitiveServices/accounts/${foundryModule.outputs.extendedAIServicesConfig[0].cognitiveServiceName}/projects/${foundryProjectName}/connections/${placeOrderAPIConnection.name}'
output placeOrderAPIConnectionId string = '${foundryModule.outputs.extendedAIServicesConfig[0].foundryProjectId}/connections/${placeOrderAPIConnection.name}'

output productCatalogAPIConnectionId string = '/subscriptions/${subscription().subscriptionId}/resourceGroups/${resourceGroup().name}/providers/Microsoft.CognitiveServices/accounts/${foundryModule.outputs.extendedAIServicesConfig[0].cognitiveServiceName}/projects/${foundryProjectName}/connections/${productCatalogAPIConnection.name}'
output productCatalogAPIConnectionId string = '${foundryModule.outputs.extendedAIServicesConfig[0].foundryProjectId}/connections/${productCatalogAPIConnection.name}'

1 change: 1 addition & 0 deletions modules/cognitive-services/v3/foundry.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,5 @@ output extendedAIServicesConfig array = [for (config, i) in aiServicesConfig: {
cognitiveServiceName: cognitiveServices[i].name
endpoint: cognitiveServices[i].properties.endpoint
foundryProjectEndpoint: 'https://${cognitiveServices[i].name}.services.ai.azure.com/api/projects/${aiProject[i].name}'
foundryProjectId: aiProject[i].id
}]