Good morning. When a Vector store Expires, is there a way to delete all the associated files as well? Or is that a manual exercise that you would always need to perform yourself?
thank you so much.
Good morning. When a Vector store Expires, is there a way to delete all the associated files as well? Or is that a manual exercise that you would always need to perform yourself?
thank you so much.
When a vector expires, it doesn’t delete the associated files. Not even if you delete the vector store.
Hello, I was looking at the API instructions:
https://platform.openai.com/docs/api-reference/vector-stores/delete
and there was no mention of the files won’t be deleted though somehow I have the same feeling. But If i uploaded i.e. 20+ files for this vector via a local folder upload.
I had to manually go to each vector, retrieve associated File_Ids and then write a code to delete the files. It is not very efficient! It would be great if you could choose to delete a vector and also all the files in it (if you choose to).
If there is an efficient way to do that, please do advice.
*Also some files could not be deleted regardless how i tried.
Auto-deleting files upon removal of a vector store would not be a good pattern, because files can be employed by multiple vector stores. It is also common to decide to try different strategies such as deleting a vector store and then re-creating a new vector store with a different chunking strategy, if one underperforms or returns more or less continuous data that is ideal. A vector store can be set to auto-expire to avoid recurring storage costs, and then you can re-engage files if a user visits a chat again.
It certainly could be useful if there was an option delete_source_files, if used intelligently, but the delete API request currently doesn’t take a message body.
Delete file and delete from vector store even requires multiple requests, one for each file, instead of a list or batch, which is tedious, other areas for efficiency improvement.
So for efficiency, and to not have orphan files in your storage, you would have your own database, your own list of file assignments to vector store, or to thread message attachments or other purposes. Then you would not need to make a network request, returning information which could blindly delete files in use elsewhere.