File tree Expand file tree Collapse file tree 3 files changed +22
-21
lines changed Expand file tree Collapse file tree 3 files changed +22
-21
lines changed Original file line number Diff line number Diff line change @@ -1525,7 +1525,7 @@ module containerApp 'br/public:avm/res/app/container-app:0.18.1' = {
15251525 }
15261526 {
15271527 name : 'AZURE_AI_SEARCH_CONNECTION_NAME'
1528- value : searchService . outputs . name
1528+ value : aiSearchConnectionName
15291529 }
15301530 {
15311531 name : 'AZURE_AI_SEARCH_INDEX_NAME'
@@ -2041,7 +2041,7 @@ output COSMOSDB_ACCOUNT_NAME string = cosmosDbResourceName
20412041output AZURE_SEARCH_ENDPOINT string =searchService .outputs .endpoint
20422042output AZURE_CLIENT_ID string = userAssignedIdentity !.outputs .clientId
20432043output AZURE_TENANT_ID string = tenant ().tenantId
2044- output AZURE_AI_SEARCH_CONNECTION_NAME string = searchService . outputs . name
2044+ output AZURE_AI_SEARCH_CONNECTION_NAME string = aiSearchConnectionName
20452045output AZURE_COGNITIVE_SERVICES string = 'https://cognitiveservices.azure.com/.default'
20462046output REASONING_MODEL_NAME string = aiFoundryAiServicesReasoningModelDeployment .name
20472047output MCP_SERVER_NAME string = 'MACAE MCP Server'
Original file line number Diff line number Diff line change @@ -1556,7 +1556,7 @@ module containerApp 'br/public:avm/res/app/container-app:0.18.1' = {
15561556 }
15571557 {
15581558 name : 'AZURE_AI_SEARCH_CONNECTION_NAME'
1559- value : searchService . outputs . name
1559+ value : aiSearchConnectionName
15601560 }
15611561 {
15621562 name : 'AZURE_AI_SEARCH_INDEX_NAME'
@@ -2096,7 +2096,7 @@ output COSMOSDB_ACCOUNT_NAME string = cosmosDbResourceName
20962096output AZURE_SEARCH_ENDPOINT string =searchService .outputs .endpoint
20972097output AZURE_CLIENT_ID string = userAssignedIdentity !.outputs .clientId
20982098output AZURE_TENANT_ID string = tenant ().tenantId
2099- output AZURE_AI_SEARCH_CONNECTION_NAME string = searchService . outputs . name
2099+ output AZURE_AI_SEARCH_CONNECTION_NAME string = aiSearchConnectionName
21002100output AZURE_COGNITIVE_SERVICES string = 'https://cognitiveservices.azure.com/.default'
21012101output REASONING_MODEL_NAME string = aiFoundryAiServicesReasoningModelDeployment .name
21022102output MCP_SERVER_NAME string = 'MACAE MCP Server'
Original file line number Diff line number Diff line change 4848 sys .exit (1 )
4949
5050for idx , blob in enumerate (blob_list , start = 1 ):
51- if blob .name .endswith (".csv" ):
52- title = blob .name .replace (".csv" , "" )
53- csv_data = container_client .download_blob (blob .name ).readall ()
54-
55- try :
56- print (f"Reading data from blob: { blob .name } ..." )
57- csv_text = csv_data .decode ('utf-8' )
58- data_list .append ({
59- "content" : csv_text ,
60- "id" : str (idx ),
61- "title" : title
62- })
63- success_count += 1
64- except Exception as e :
65- print (f"Error reading CSV file - { blob .name } : { e } " )
66- fail_count += 1
67- continue
51+ #if blob.name.endswith(".csv"):
52+ title = blob .name .replace (".csv" , "" )
53+ title = blob .name .replace (".json" , "" )
54+ data = container_client .download_blob (blob .name ).readall ()
55+
56+ try :
57+ print (f"Reading data from blob: { blob .name } ..." )
58+ text = data .decode ('utf-8' )
59+ data_list .append ({
60+ "content" : text ,
61+ "id" : str (idx ),
62+ "title" : title
63+ })
64+ success_count += 1
65+ except Exception as e :
66+ print (f"Error reading file - { blob .name } : { e } " )
67+ fail_count += 1
68+ continue
6869
6970if not data_list :
7071 print (f"No data to upload to Azure Search index. Success: { success_count } , Failed: { fail_count } " )
You can’t perform that action at this time.
0 commit comments