A collection file is a document that can be uploaded to a vector store collection, allowing you to batch-import structured data efficiently. Instead of adding individual items manually, collection files provide a way to store and manage multiple data points in a single upload.
Follow this guide to add a file to a vector store collection on Vultr Serverless Inference using the Vultr API.
Send a GET
request to the List Collections endpoint and note the target collection's ID.
$ curl "https://api.vultrinference.com/v1/vector_store" \
-X GET \
-H "Authorization: Bearer ${INFERENCE_API_KEY}"
Send a POST
request to the Add Collection File endpoint to add a file to the target vector store collection.
$ curl "https://api.vultrinference.com/v1/vector_store/{collection-id}/files" \
-X POST \
-H "Authorization: Bearer ${INFERENCE_API_KEY}" \
-H "Content-Type: multipart/form-data" \
-F "file=@{path-to-your-file}"
Send a GET
request to the List Collection Files endpoint to list all files in the vector store collection.
$ curl "https://api.vultrinference.com/v1/vector_store/{collection-id}/files" \
-X GET \
-H "Authorization: Bearer ${INFERENCE_API_KEY}"
No comments yet.