TsgcHTTP_API_OpenAI › Methods › RetrieveVectorStoreFileBatch
Retrieves a vector store file batch by its identifier
function RetrieveVectorStoreFileBatch(const aVectorStoreId, aBatchId: string): TsgcOpenAIClass_VectorStoreFileBatch;
| Name | Type | Description |
|---|---|---|
aVectorStoreId | const string | The identifier of the vector store that owns the batch. |
aBatchId | const string | The identifier of the file batch to retrieve (e.g. vsfb_abc123). |
The file batch object with its current Status and FileCounts breakdown (TsgcOpenAIClass_VectorStoreFileBatch)
Calls GET /v1/vector_stores/{vector_store_id}/file_batches/{batch_id} to observe the progress of a batch. Poll until Status reaches completed, cancelled or failed; FileCounts shows how many files are still in_progress versus completed or failed.
var oBatch: TsgcOpenAIClass_VectorStoreFileBatch;
begin
oBatch := oAPI.RetrieveVectorStoreFileBatch('vs_abc123', 'vsfb_abc123');
ShowMessage(oBatch.Status + ' - completed: ' + IntToStr(oBatch.FileCounts.Completed));
end;