TsgcHTTP_API_OpenAIMethods › CancelVectorStoreFileBatch

CancelVectorStoreFileBatch Method

Cancels a vector store file batch currently in progress

Syntax

function CancelVectorStoreFileBatch(const aVectorStoreId, aBatchId: string) : TsgcOpenAIClass_VectorStoreFileBatch;

Parameters

NameTypeDescription
aVectorStoreIdconst stringThe identifier of the vector store that owns the batch.
aBatchIdconst stringThe identifier of the file batch to cancel.

Return Value

The batch object with its status advanced to cancelling or cancelled (TsgcOpenAIClass_VectorStoreFileBatch)

Remarks

Calls POST /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel to stop an in-progress batch as soon as possible. Files that were already indexed remain attached to the vector store; pending files are not processed.

Example

var oBatch: TsgcOpenAIClass_VectorStoreFileBatch;
begin
  oBatch := oAPI.CancelVectorStoreFileBatch('vs_abc123', 'vsfb_abc123');
  ShowMessage('Status: ' + oBatch.Status);
end;

Back to Methods