TsgcHTTP_API_OpenAI › Methods › CreateVectorStoreFileBatch
Attaches multiple files to a vector store in a single batch operation
function CreateVectorStoreFileBatch(const aVectorStoreId, aFileIds: string) : TsgcOpenAIClass_VectorStoreFileBatch;
| Name | Type | Description |
|---|---|---|
aVectorStoreId | const string | The identifier of the vector store that should receive the files. |
aFileIds | const string | Comma-separated list of file ids (e.g. file_abc,file_def) previously uploaded through UploadFile. |
The newly created file batch object with its id, status and file counts (TsgcOpenAIClass_VectorStoreFileBatch)
Calls POST /v1/vector_stores/{vector_store_id}/file_batches to attach up to 500 files at once and queue them for indexing. Indexing happens asynchronously; poll RetrieveVectorStoreFileBatch to track completion or list files with ListVectorStoreFilesBatch.
var oBatch: TsgcOpenAIClass_VectorStoreFileBatch;
begin
oBatch := oAPI.CreateVectorStoreFileBatch('vs_abc123', 'file_a,file_b,file_c');
ShowMessage('Batch ' + oBatch.Id + ' - ' + oBatch.Status);
end;