@@ -293,6 +293,7 @@ def import_files(
293
293
timeout : int = 600 ,
294
294
max_embedding_requests_per_min : int = 1000 ,
295
295
use_advanced_pdf_parsing : Optional [bool ] = False ,
296
+ partial_failures_sink : Optional [str ] = None ,
296
297
) -> ImportRagFilesResponse :
297
298
"""
298
299
Import files to an existing RagCorpus, wait until completion.
@@ -378,6 +379,14 @@ def import_files(
378
379
timeout: Default is 600 seconds.
379
380
use_advanced_pdf_parsing: Whether to use advanced PDF
380
381
parsing on uploaded files.
382
+ partial_failures_sink: Either a GCS path to store partial failures or a
383
+ BigQuery table to store partial failures. The format is
384
+ "gs://my-bucket/my/object.ndjson" for GCS or
385
+ "bq://my-project.my-dataset.my-table" for BigQuery. An existing GCS
386
+ object cannot be used. However, the BigQuery table may or may not
387
+ exist - if it does not exist, it will be created. If it does exist,
388
+ the schema will be checked and the partial failures will be appended
389
+ to the table.
381
390
Returns:
382
391
ImportRagFilesResponse.
383
392
"""
@@ -394,6 +403,7 @@ def import_files(
394
403
chunk_overlap = chunk_overlap ,
395
404
max_embedding_requests_per_min = max_embedding_requests_per_min ,
396
405
use_advanced_pdf_parsing = use_advanced_pdf_parsing ,
406
+ partial_failures_sink = partial_failures_sink ,
397
407
)
398
408
client = _gapic_utils .create_rag_data_service_client ()
399
409
try :
@@ -412,6 +422,7 @@ async def import_files_async(
412
422
chunk_overlap : int = 200 ,
413
423
max_embedding_requests_per_min : int = 1000 ,
414
424
use_advanced_pdf_parsing : Optional [bool ] = False ,
425
+ partial_failures_sink : Optional [str ] = None ,
415
426
) -> operation_async .AsyncOperation :
416
427
"""
417
428
Import files to an existing RagCorpus asynchronously.
@@ -497,6 +508,14 @@ async def import_files_async(
497
508
QPM would be used.
498
509
use_advanced_pdf_parsing: Whether to use advanced PDF
499
510
parsing on uploaded files.
511
+ partial_failures_sink: Either a GCS path to store partial failures or a
512
+ BigQuery table to store partial failures. The format is
513
+ "gs://my-bucket/my/object.ndjson" for GCS or
514
+ "bq://my-project.my-dataset.my-table" for BigQuery. An existing GCS
515
+ object cannot be used. However, the BigQuery table may or may not
516
+ exist - if it does not exist, it will be created. If it does exist,
517
+ the schema will be checked and the partial failures will be appended
518
+ to the table.
500
519
Returns:
501
520
operation_async.AsyncOperation.
502
521
"""
@@ -513,6 +532,7 @@ async def import_files_async(
513
532
chunk_overlap = chunk_overlap ,
514
533
max_embedding_requests_per_min = max_embedding_requests_per_min ,
515
534
use_advanced_pdf_parsing = use_advanced_pdf_parsing ,
535
+ partial_failures_sink = partial_failures_sink ,
516
536
)
517
537
async_client = _gapic_utils .create_rag_data_service_async_client ()
518
538
try :
0 commit comments