Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

API Vertex AI RAG Engine: Upload file in corpus failed

Hi Team,

I'm playing with AI Platform and the RAG engine. Amazing feature, works well, except for the specific Upload File in corpus API, throw API or even a Java implementation

I've created my RAG Corpus.  I've imported (import , not upload) files throw GCS resources  and check my corpus with RAG file list.  All sounds good. 😊

BUT.... 

 Upload RAG file failed. I get a HTTP 200 with en empty response, and the file is not imported. (File list in the corpus stay empty 😕 )

My POST

 

curl -X POST \
-H "X-Goog-Upload-Protocol: multipart" \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-F metadata="{'rag_file': {'display_name':' test-api', 'description':'test-des-api'}}" \
-F file=@./test.txt \
"https://europe-west3-aiplatform.googleapis.com/v1/projects/MYPROJECT/locations/europe-west3/ragCorpora/CORPUSID/ragFiles:upload"

 

I get the HTTP 200 with body

 

{
  "ragFile": {}
}

 

 

I get the same result throw Java implementation

Other issue, the URL given in the documentation  is

https://LOCATION-aiplatform.googleapis.com/upload/v1/projects/PROJECT_ID/locations/LOCATION/ragCorpora/RAG_CORPUS_ID/ragFiles:upload

and seems wrong . Get a 404 with the link.

Right link seems to be 

https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/ragCorpora/RAG_...

Your help will be appreciated to understand what's wrong in this file upload into my RAG corpus.

Thanks !!!! 

 

 

1 3 421
3 REPLIES 3