Method: projects.locations.ragCorpora.ragFiles.import

Import files from Google Cloud Storage or Google Drive into a RagCorpus.

HTTP request

POST http://{service-endpoint}/v1beta1/{parent}/ragFiles:import

Where {service-endpoint} is one of the supported service endpoints.

Path parameters

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:

JSON representation
{
  "importRagFilesConfig": {
    object (ImportRagFilesConfig)
  }
}
Fields
importRagFilesConfig

object (ImportRagFilesConfig)

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.

Authorization scopes

Requires the following OAuth scope:

  • http://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ImportRagFilesConfig

Config for importing RagFiles.

JSON representation
{
  "ragFileChunkingConfig": {
    object (RagFileChunkingConfig)
  },

  // Union field import_source can be only one of the following:
  "gcsSource": {
    object (GcsSource)
  },
  "googleDriveSource": {
    object (GoogleDriveSource)
  }
  // End of list of possible types for union field import_source.
}
Fields
ragFileChunkingConfig

object (RagFileChunkingConfig)

Specifies the size and overlap of chunks after importing RagFiles.

Union field import_source.

import_source can be only one of the following:

gcsSource

object (GcsSource)

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

googleDriveSource

object (GoogleDriveSource)

Google Drive location. Supports importing individual files as well as Google Drive folders.