Find answers from the community

Updated 2 weeks ago

ragapp

Hi there! I was playing around with the endpoints for ragapp. I can't seem to figure out which endpoint to hit to upload a file.

I tried a curl like so:
Plain Text
curl -X 'POST' \
  'http://localhost:3030/api/management/files' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'file=@3M_2016_10K.pdf;type=application/pdf' \
  -F 'fileIndex=0' \
  -F 'totalFiles=1'

What do I add in the fileIndex and totalFiles if I want to add another 3 files let's say
And there's also another endpoint like:
Plain Text
curl -X 'POST' \
  'http://localhost:3030/api/chat/upload' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "base64": "string",
  "name": "string",
  "params": "string"
}'

and what params are permissible here? it does not seem to accept an empty string
b
6 comments
I always seem to get this error on parsing a large number of files
Here's my python script
https://github.com/patronus-ai/financebench/tree/main/pdfs

There seems to be no way ingest all the files in through the APIs
Was finally able to start the ingestion process:

curl -X 'POST' \
'http://localhost:3030/api/management/files' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'file=@3M_2016_10K.pdf;type=application/pdf' \
-F 'fileIndex=string' \
-F 'totalFiles=string'
Hardcoded these two params:

-F 'fileIndex=string' \
-F 'totalFiles=string'
Add a reply
Sign up and join the conversation on Discord