@@ -86,32 +86,32 @@ After creating your own AI Services, you can connect it to your hub.
86
86
87
87
* Provide your subscription details:
88
88
89
- [ !notebook-python[ ] ( ~/azureml-examples-main/sdk/python/resources/connections/connections.ipynb?name=details )]
89
+ [ !notebook-python[ ] ( ~/azureml-examples-main/sdk/python/resources/connections/connections.ipynb?name=details )]
90
90
91
91
* Get a handle to the hub:
92
92
93
- [ !notebook-python[ ] ( ~/azureml-examples-main/sdk/python/resources/connections/connections.ipynb?name=ml_client )]
93
+ [ !notebook-python[ ] ( ~/azureml-examples-main/sdk/python/resources/connections/connections.ipynb?name=ml_client )]
94
94
95
95
2 . Use ` ml_client ` to create the connection to your AI Services:
96
96
97
- ``` python
98
- from azure.ai.ml.entities import AzureAIServicesConnection
97
+ ``` python
98
+ from azure.ai.ml.entities import AzureAIServicesConnection
99
99
100
- # construct an AI Services connection
101
- my_connection_name = " myaiservivce" # any name you want
102
- aiservices_resource_name = < resource_name> # copy from Azure AI Foundry portal
103
- my_endpoint = " <endpoint>" # copy from Azure AI Foundry portal
104
- my_api_keys = None # leave blank for Authentication type = AAD
105
- my_ai_services_resource_id = f " /subscriptions/ { subscription_id} /resourceGroups/ { resource_group} /providers/Microsoft.CognitiveServices/accounts/ { aiservices_resource_name} "
100
+ # construct an AI Services connection
101
+ my_connection_name = " myaiservivce" # any name you want
102
+ aiservices_resource_name = < resource_name> # copy from Azure AI Foundry portal
103
+ my_endpoint = " <endpoint>" # copy from Azure AI Foundry portal
104
+ my_api_keys = None # leave blank for Authentication type = AAD
105
+ my_ai_services_resource_id = f " /subscriptions/ { subscription_id} /resourceGroups/ { resource_group} /providers/Microsoft.CognitiveServices/accounts/ { aiservices_resource_name} "
106
106
107
- my_connection = AzureAIServicesConnection(name = my_connection_name,
108
- endpoint = my_endpoint,
109
- api_key = my_api_keys,
110
- ai_services_resource_id = my_ai_services_resource_id)
107
+ my_connection = AzureAIServicesConnection(name = my_connection_name,
108
+ endpoint = my_endpoint,
109
+ api_key = my_api_keys,
110
+ ai_services_resource_id = my_ai_services_resource_id)
111
111
112
- # Create the connection
113
- ml_client.connections.create_or_update(my_connection)
114
- ```
112
+ # Create the connection
113
+ ml_client.connections.create_or_update(my_connection)
114
+ ```
115
115
116
116
# [Azure CLI](#tab/azurecli)
117
117
0 commit comments