@@ -343,9 +343,9 @@ def upload_file(
343
343
description : Optional [str ] = None ,
344
344
transformation_config : Optional [TransformationConfig ] = None ,
345
345
timeout : int = 600 ,
346
+ max_embedding_requests_per_min : int = 1000 ,
346
347
) -> RagFile :
347
- """
348
- Synchronous file upload to an existing RagCorpus.
348
+ """Synchronous file upload to an existing RagCorpus.
349
349
350
350
Example usage:
351
351
@@ -375,12 +375,17 @@ def upload_file(
375
375
corpus_name: The name of the RagCorpus resource into which to upload the file.
376
376
Format: ``projects/{project}/locations/{location}/ragCorpora/{rag_corpus}``
377
377
or ``{rag_corpus}``.
378
- path: A local file path. For example,
379
- "usr/home/my_file.txt".
378
+ path: A local file path. For example, "usr/home/my_file.txt".
380
379
display_name: The display name of the data file.
381
380
description: The description of the RagFile.
382
381
transformation_config: The config for transforming the RagFile, like chunking.
383
382
timeout: Default is 600 seconds.
383
+ max_embedding_requests_per_min: Optional. The max number of queries per
384
+ minute that this job is allowed to make to the embedding model specified
385
+ on the corpus. This value is specific to this job and not shared across
386
+ other import jobs. Consult the Quotas page on the project to set an
387
+ appropriate value here. If unspecified, a default value of 1,000 QPM
388
+ would be used.
384
389
385
390
Returns:
386
391
RagFile.
@@ -421,7 +426,8 @@ def upload_file(
421
426
"chunk_overlap" : chunk_overlap ,
422
427
}
423
428
}
424
- }
429
+ },
430
+ "max_embedding_requests_per_min" : max_embedding_requests_per_min ,
425
431
}
426
432
427
433
files = {
0 commit comments