TsgcHTTP_API_OpenAI › Methods › DeleteVectorStoreFile
Detaches a file from a vector store without deleting the underlying file
function DeleteVectorStoreFile(const aVectorStoreId, aFileId: string) : TsgcOpenAIClass_Response_Delete_Status;
| Name | Type | Description |
|---|---|---|
aVectorStoreId | const string | The identifier of the vector store that owns the association. |
aFileId | const string | The identifier of the file to detach from the vector store. |
Deletion confirmation exposing the association id and a Deleted flag (TsgcOpenAIClass_Response_Delete_Status)
Calls DELETE /v1/vector_stores/{vector_store_id}/files/{file_id} to remove a file from the vector store's index. The underlying file uploaded through the Files API is kept intact and can still be used elsewhere or attached to other vector stores.
begin
if oAPI.DeleteVectorStoreFile('vs_abc123', 'file_abc123').Deleted then
ShowMessage('File detached');
end;