File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Deployment/scripts/aihub_scripts Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ def get_secrets_from_kv(kv_name, secret_name):
8686created_project = ml_client .workspaces .begin_create (workspace = my_project ).result ()
8787
8888open_ai_connection = AzureOpenAIConnection (
89- name = open_ai_res_name ,
89+ name = "Azure_OpenAI" ,
9090 api_key = open_ai_key ,
9191 api_version = openai_api_version ,
9292 azure_endpoint = f"https://{ open_ai_res_name } .openai.azure.com/" ,
@@ -95,11 +95,15 @@ def get_secrets_from_kv(kv_name, secret_name):
9595
9696ml_client .connections .create_or_update (open_ai_connection )
9797
98+ target = f"https://{ ai_search_res_name } .search.windows.net/"
99+
98100# Create AI Search resource
99101aisearch_connection = AzureAISearchConnection (
100- name = ai_search_res_name ,
101- endpoint = ai_search_endpoint ,
102+ name = "Azure_AISearch" ,
103+ endpoint = target ,
102104 credentials = ApiKeyConfiguration (key = ai_search_key ),
103105)
104106
107+ aisearch_connection .tags ["ResourceId" ] = f"/subscriptions/{ subscription_id } /resourceGroups/{ resource_group_name } /providers/Microsoft.Search/searchServices/{ ai_search_res_name } "
108+
105109ml_client .connections .create_or_update (aisearch_connection )
You can’t perform that action at this time.
0 commit comments