Skip to content

Commit 6410d2b

Browse files
committed
fix: vector stores file batch cancel payload
1 parent e9ca288 commit 6410d2b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Resources/VectorStoresFileBatches.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function listFiles(string $vectorStoreId, string $fileBatchId, array $par
7070
*/
7171
public function cancel(string $vectorStoreId, string $fileBatchId): VectorStoreFileBatchResponse
7272
{
73-
$payload = Payload::delete("vector_stores/$vectorStoreId/file_batches", $fileBatchId);
73+
$payload = Payload::cancel("vector_stores/$vectorStoreId/file_batches", $fileBatchId);
7474

7575
/** @var Response<array{id: string, object: string, created_at: int, vector_store_id: string, status: string, file_counts: array{in_progress: int, completed: int, failed: int, cancelled: int, total: int}}> $response */
7676
$response = $this->transporter->requestObject($payload);

tests/Resources/VectorStoresFileBatches.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
});
4545

4646
test('cancel', function () {
47-
$client = mockClient('DELETE', 'vector_stores/vs_abc123/file_batches/vsfb_abc123', [], Response::from(vectorStoreFileBatchResource(), metaHeaders()));
47+
$client = mockClient('POST', 'vector_stores/vs_abc123/file_batches/vsfb_abc123/cancel', [], Response::from(vectorStoreFileBatchResource(), metaHeaders()));
4848

4949
$result = $client->vectorStores()->batches()->cancel('vs_abc123', 'vsfb_abc123');
5050

0 commit comments

Comments
 (0)