TsgcHTTP_API_OpenAIMethods › DeleteVectorStoreFile

DeleteVectorStoreFile Method

Detaches a file from a vector store without deleting the underlying file

Syntax

function DeleteVectorStoreFile(const aVectorStoreId, aFileId: string) : TsgcOpenAIClass_Response_Delete_Status;

Parameters

NameTypeDescription
aVectorStoreIdconst stringThe identifier of the vector store that owns the association.
aFileIdconst stringThe identifier of the file to detach from the vector store.

Return Value

Deletion confirmation exposing the association id and a Deleted flag (TsgcOpenAIClass_Response_Delete_Status)

Remarks

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.

Example

begin
  if oAPI.DeleteVectorStoreFile('vs_abc123', 'file_abc123').Deleted then
    ShowMessage('File detached');
end;

Back to Methods