The file vectors feature is still in beta and is only available on Private IPFS. Please contact the team at [email protected] if you have any issues.
Overview
A common nusance when building AI apps is context embeddings. If you use a traditional stack you generall have to store an embedding, vectorize it, store the vector, then when you query a vector you’ll get another reference to the file which you then have to fetch again. Pinata’s solution is much more elegant. With Pinata’s file vectoring you can upload a file and vector it at the same time.Pinata Vector Storage: Public Beta Limits
During the public beta, Pinata Vector Storage has the following limits:- File Vectorization Limit: You can vectorize up to 10,000 files.
- Index Limit: You can create a maximum of 5 indexes, managed using Pinata Groups.
- Results Limit: You can query a vector and get a max of 20 files returned in one request.
Vectorizing Files
There are two ways you can vectorize file uploads, and with both options files must be part of a group in order for vectors and queries to work.Vectorize on Upload
If you use the Files SDK you can vectorize a file on upload.Vectorize After Upload
If you already have a file that’s been uploaded and it’s part of a group then you can vectorize it.Querying Vectors
After a file has been vectorized and it’s part of a group, you can query vectors for a given group.Returning the Top Match File
A unique feature in the SDK is if you pass in thereturnFile
flag then you will get the file and it’s contents rather than just the reference to the file.
Deleting Vectors
If at any point you need to delete vectors for a file you can do so with thedeleteVectors
method in the SDK.