TsgcHTTP_API_OpenAIMethods › DeleteVectorStore

DeleteVectorStore Method

Permanently deletes a vector store and its index

Syntax

function DeleteVectorStore(const aVectorStoreId: string) : TsgcOpenAIClass_Response_Delete_Status;

Parameters

NameTypeDescription
aVectorStoreIdconst stringThe identifier of the vector store to delete.

Return Value

Deletion confirmation containing the vector store id and a boolean Deleted flag (TsgcOpenAIClass_Response_Delete_Status)

Remarks

Calls DELETE /v1/vector_stores/{vector_store_id} to permanently delete the vector store and its index. The underlying files uploaded through the Files API are not removed and remain available for reuse. Runs that referenced the store will continue to function until they complete but future searches will fail.

Example

begin
  if oAPI.DeleteVectorStore('vs_abc123').Deleted then
    ShowMessage('Vector store removed');
end;

Back to Methods