@@ -73,7 +73,7 @@ def import_documents_bigquery_sample(
7373 print (f"Waiting for operation to complete: { operation .operation .name } " )
7474 response = operation .result ()
7575
76- # Once the operation is complete,
76+ # After the operation is complete,
7777 # get information from operation metadata
7878 metadata = discoveryengine .ImportDocumentsMetadata (operation .metadata )
7979
@@ -99,7 +99,15 @@ def import_documents_gcs_sample(
9999 # project_id = "YOUR_PROJECT_ID"
100100 # location = "YOUR_LOCATION" # Values: "global"
101101 # data_store_id = "YOUR_DATA_STORE_ID"
102- # Format: `gs://bucket/directory/object.json` or `gs://bucket/directory/*.json`
102+
103+ # Examples:
104+ # - Unstructured documents
105+ # - `gs://bucket/directory/file.pdf`
106+ # - `gs://bucket/directory/*.pdf`
107+ # - Unstructured documents with JSONL Metadata
108+ # - `gs://bucket/directory/file.json`
109+ # - Unstructured documents with CSV Metadata
110+ # - `gs://bucket/directory/file.csv`
103111 # gcs_uri = "YOUR_GCS_PATH"
104112
105113 # For more information, refer to:
@@ -125,8 +133,13 @@ def import_documents_gcs_sample(
125133 request = discoveryengine .ImportDocumentsRequest (
126134 parent = parent ,
127135 gcs_source = discoveryengine .GcsSource (
136+ # Multiple URIs are supported
128137 input_uris = [gcs_uri ],
129- data_schema = "custom" ,
138+ # Options:
139+ # - `content` - Unstructured documents (PDF, HTML, DOC, TXT, PPTX)
140+ # - `custom` - Unstructured documents with JSONL metadata
141+ # - `csv` - Unstructured documents with CSV metadata
142+ data_schema = "content" ,
130143 ),
131144 # Options: `FULL`, `INCREMENTAL`
132145 reconciliation_mode = discoveryengine .ImportDocumentsRequest .ReconciliationMode .INCREMENTAL ,
@@ -138,7 +151,7 @@ def import_documents_gcs_sample(
138151 print (f"Waiting for operation to complete: { operation .operation .name } " )
139152 response = operation .result ()
140153
141- # Once the operation is complete,
154+ # After the operation is complete,
142155 # get information from operation metadata
143156 metadata = discoveryengine .ImportDocumentsMetadata (operation .metadata )
144157
@@ -213,7 +226,7 @@ def import_documents_cloud_sql_sample(
213226 print (f"Waiting for operation to complete: { operation .operation .name } " )
214227 response = operation .result ()
215228
216- # Once the operation is complete,
229+ # After the operation is complete,
217230 # get information from operation metadata
218231 metadata = discoveryengine .ImportDocumentsMetadata (operation .metadata )
219232
@@ -285,7 +298,7 @@ def import_documents_spanner_sample(
285298 print (f"Waiting for operation to complete: { operation .operation .name } " )
286299 response = operation .result ()
287300
288- # Once the operation is complete,
301+ # After the operation is complete,
289302 # get information from operation metadata
290303 metadata = discoveryengine .ImportDocumentsMetadata (operation .metadata )
291304
@@ -354,7 +367,7 @@ def import_documents_firestore_sample(
354367 print (f"Waiting for operation to complete: { operation .operation .name } " )
355368 response = operation .result ()
356369
357- # Once the operation is complete,
370+ # After the operation is complete,
358371 # get information from operation metadata
359372 metadata = discoveryengine .ImportDocumentsMetadata (operation .metadata )
360373
@@ -443,7 +456,7 @@ def import_documents_bigtable_sample(
443456 print (f"Waiting for operation to complete: { operation .operation .name } " )
444457 response = operation .result ()
445458
446- # Once the operation is complete,
459+ # After the operation is complete,
447460 # get information from operation metadata
448461 metadata = discoveryengine .ImportDocumentsMetadata (operation .metadata )
449462
@@ -518,7 +531,7 @@ def import_documents_alloy_db_sample(
518531 print (f"Waiting for operation to complete: { operation .operation .name } " )
519532 response = operation .result ()
520533
521- # Once the operation is complete,
534+ # After the operation is complete,
522535 # get information from operation metadata
523536 metadata = discoveryengine .ImportDocumentsMetadata (operation .metadata )
524537
@@ -592,7 +605,7 @@ def import_documents_healthcare_fhir_sample(
592605 print (f"Waiting for operation to complete: { operation .operation .name } " )
593606 response = operation .result ()
594607
595- # Once the operation is complete,
608+ # After the operation is complete,
596609 # get information from operation metadata
597610 metadata = discoveryengine .ImportDocumentsMetadata (operation .metadata )
598611
0 commit comments