Cancel vector store file batch
client.vectorStores.fileBatches.cancel(stringbatchID, FileBatchCancelParams { vector_store_id } params, RequestOptionsoptions?): VectorStoreFileBatch { id, created_at, file_counts, 3 more }
POST/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel
Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.
Cancel vector store file batch
import OpenAI from "openai";
const openai = new OpenAI();
async function main() {
const deletedVectorStoreFileBatch = await openai.vectorStores.fileBatches.cancel(
"vsfb_abc123",
{ vector_store_id: "vs_abc123" }
);
console.log(deletedVectorStoreFileBatch);
}
main();
{
"id": "vsfb_abc123",
"object": "vector_store.file_batch",
"created_at": 1699061776,
"vector_store_id": "vs_abc123",
"status": "in_progress",
"file_counts": {
"in_progress": 12,
"completed": 3,
"failed": 0,
"cancelled": 0,
"total": 15,
}
}
Returns Examples
{
"id": "vsfb_abc123",
"object": "vector_store.file_batch",
"created_at": 1699061776,
"vector_store_id": "vs_abc123",
"status": "in_progress",
"file_counts": {
"in_progress": 12,
"completed": 3,
"failed": 0,
"cancelled": 0,
"total": 15,
}
}