Upload a file into a RagCorpus.
HTTP request
- Upload URI, for media upload requests:
POST http://{service-endpoint}/upload/v1beta1/{parent}/ragFiles:upload
- Metadata URI, for metadata-only requests:
POST http://{service-endpoint}/v1beta1/{parent}/ragFiles:upload
Where {service-endpoint}
is one of the supported service endpoints.
Path parameters
Parameters | |
---|---|
parent |
Required. The name of the RagCorpus resource into which to upload the file. Format: |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "ragFile": { object ( |
Fields | |
---|---|
ragFile |
Required. The RagFile to upload. |
uploadRagFileConfig |
Required. The config for the RagFiles to be uploaded into the RagCorpus. |
Response body
Response message for VertexRagDataService.UploadRagFile
.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
ragFile |
The RagFile that had been uploaded into the RagCorpus. |
error |
The error that occurred while processing the RagFile. |
Authorization scopes
Requires the following OAuth scope:
http://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
UploadRagFileConfig
Config for uploading RagFile.
JSON representation |
---|
{
"ragFileChunkingConfig": {
object ( |
Fields | |
---|---|
ragFileChunkingConfig |
Specifies the size and overlap of chunks after uploading RagFile. |