Method: media.upload

Full name: media.upload

Upload a file into a RagCorpus.

Endpoint

upload uri, for media upload requests:
`post
https: / /aiplatform.googleapis.com /upload /v1beta1 /{parent} /ragFiles:upload

  • Metadata URI, for metadata-only requests:
    POST https://aiplatform.googleapis.com/v1beta1/{parent}/ragFiles:upload

Path parameters

parent string

Required. The name of the RagCorpus resource into which to upload the file. Format: projects/{project}/locations/{location}/ragCorpora/{ragCorpus}

Request body

The request body contains data with the following structure:

Fields
ragFile object ( RagFile )

Required. The RagFile to upload.

uploadRagFileConfig object ( UploadRagFileConfig )

Required. The config for the RagFiles to be uploaded into the RagCorpus. VertexRagDataService.UploadRagFile .

Response body

Response message for VertexRagDataService.UploadRagFile .

If successful, the response body contains data with the following structure:

Fields
result Union type
The result of the upload. result can be only one of the following:
ragFile object ( RagFile )

The RagFile that had been uploaded into the RagCorpus.

error object ( Status )

The error that occurred while processing the RagFile.

JSON representation
 { 
 // result 
 "ragFile" 
 : 
 { 
 object (  RagFile 
 
) 
 } 
 , 
 "error" 
 : 
 { 
 object (  Status 
 
) 
 } 
 // Union type 
 } 

UploadRagFileConfig

Config for uploading RagFile.

Fields
ragFileChunkingConfig
(deprecated)
object ( RagFileChunkingConfig )

Specifies the size and overlap of chunks after uploading RagFile.

ragFileTransformationConfig object ( RagFileTransformationConfig )

Specifies the transformation config for RagFiles.

ragFileParsingConfig object ( RagFileParsingConfig )

Optional. Specifies the parsing config for RagFiles. RAG will use the default parser if this field is not set.

JSON representation
 { 
 "ragFileChunkingConfig" 
 : 
 { 
 object (  RagFileChunkingConfig 
 
) 
 } 
 , 
 "ragFileTransformationConfig" 
 : 
 { 
 object (  RagFileTransformationConfig 
 
) 
 } 
 , 
 "ragFileMetadataConfig" 
 : 
 { 
 object (  RagFileMetadataConfig 
 
) 
 } 
 , 
 "ragFileParsingConfig" 
 : 
 { 
 object (  RagFileParsingConfig 
 
) 
 } 
 } 
Create a Mobile Website
View Site in Mobile | Classic
Share by: