Import files from Google Cloud Storage or Google Drive into a RagCorpus.
Endpoint
posthttps://aiplatform.googleapis.com/v1/{parent}/ragFiles:import
Path parameters
parent
string
Required. The name of the RagCorpus resource into which to import files. Format: projects/{project}/locations/{location}/ragCorpora/{ragCorpus}
Request body
The request body contains data with the following structure:
Required. The config for the RagFiles to be synced and imported into the RagCorpus. VertexRagDataService.ImportRagFiles
.
Response body
If successful, the response body contains an instance of Operation
.
ImportRagFilesConfig
Config for importing RagFiles.
Specifies the transformation config for RagFiles.
maxEmbeddingRequestsPerMin
integer
Optional. The max number of queries per minute that this job is allowed to make to the embedding model specified on the corpus. This value is specific to this job and not shared across other import jobs. Consult the Quotas page on the project to set an appropriate value here. If unspecified, a default value of 1,000 QPM would be used.
import_source
Union type
import_source
can be only one of the following:Google Cloud Storage location. Supports importing individual files as well as entire Google Cloud Storage directories. Sample formats: - gs://bucketName/my_directory/objectName/my_file.txt
- gs://bucketName/my_directory
Google Drive location. Supports importing individual files as well as Google Drive folders.
Slack channels with their corresponding access tokens.
Jira queries with their corresponding authentication.
partial_failure_sink
Union type
import_result_sink
. partial_failure_sink
can be only one of the following:The Cloud Storage path to write partial failures to. Deprecated. Prefer to use importResultGcsSink
.
The BigQuery destination to write partial failures to. It should be a bigquery table resource name (e.g. "bq://projectId.bqDatasetId.bqTableId"). The dataset must exist. If the table does not exist, it will be created with the expected schema. If the table exists, the schema will be validated and data will be added to this existing table. Deprecated. Prefer to use import_result_bq_sink
.
JSON representation |
---|
{ "ragFileTransformationConfig": { object ( |
BigQueryDestination
The BigQuery location for the output content.
outputUri
string
Required. BigQuery URI to a project or table, up to 2000 characters long.
When only the project is specified, the Dataset and Table is created. When the full table reference is specified, the Dataset must exist and table must not exist.
Accepted forms:
- BigQuery path. For example:
bq://projectId
orbq://projectId.bqDatasetId
orbq://projectId.bqDatasetId.bqTableId
.
JSON representation |
---|
{ "outputUri": string } |