Skip to content

Commit e0194f5

Browse files
feat(api): fix file batches SDK to list_files
1 parent 52c1627 commit e0194f5

File tree

6 files changed

+168
-168
lines changed

6 files changed

+168
-168
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 109
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-4337a6181c2db17737133e944b4b660a5e00ea10dce6be3252918e39451e9b5f.yml
33
openapi_spec_hash: a0bc8f4b5f45bc5741fed8eaa61171c3
4-
config_hash: d8706905bf16d9e4141e88d5a778263b
4+
config_hash: 0412cd40c0609550c1a47c69dd104e4f

api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ Methods:
279279

280280
- <code title="post /v1/vector_stores/{vector_store_id}/file_batches">client.vector_stores.file_batches.<a href="./src/llama_stack_client/resources/vector_stores/file_batches.py">create</a>(vector_store_id, \*\*<a href="src/llama_stack_client/types/vector_stores/file_batch_create_params.py">params</a>) -> <a href="./src/llama_stack_client/types/vector_stores/vector_store_file_batches.py">VectorStoreFileBatches</a></code>
281281
- <code title="get /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}">client.vector_stores.file_batches.<a href="./src/llama_stack_client/resources/vector_stores/file_batches.py">retrieve</a>(batch_id, \*, vector_store_id) -> <a href="./src/llama_stack_client/types/vector_stores/vector_store_file_batches.py">VectorStoreFileBatches</a></code>
282-
- <code title="get /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files">client.vector_stores.file_batches.<a href="./src/llama_stack_client/resources/vector_stores/file_batches.py">list</a>(batch_id, \*, vector_store_id, \*\*<a href="src/llama_stack_client/types/vector_stores/file_batch_list_params.py">params</a>) -> <a href="./src/llama_stack_client/types/vector_stores/vector_store_file.py">SyncOpenAICursorPage[VectorStoreFile]</a></code>
283282
- <code title="post /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel">client.vector_stores.file_batches.<a href="./src/llama_stack_client/resources/vector_stores/file_batches.py">cancel</a>(batch_id, \*, vector_store_id) -> <a href="./src/llama_stack_client/types/vector_stores/vector_store_file_batches.py">VectorStoreFileBatches</a></code>
283+
- <code title="get /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files">client.vector_stores.file_batches.<a href="./src/llama_stack_client/resources/vector_stores/file_batches.py">list_files</a>(batch_id, \*, vector_store_id, \*\*<a href="src/llama_stack_client/types/vector_stores/file_batch_list_files_params.py">params</a>) -> <a href="./src/llama_stack_client/types/vector_stores/vector_store_file.py">SyncOpenAICursorPage[VectorStoreFile]</a></code>
284284

285285
# Models
286286

src/llama_stack_client/resources/vector_stores/file_batches.py

Lines changed: 89 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
)
1919
from ...pagination import SyncOpenAICursorPage, AsyncOpenAICursorPage
2020
from ..._base_client import AsyncPaginator, make_request_options
21-
from ...types.vector_stores import file_batch_list_params, file_batch_create_params
21+
from ...types.vector_stores import file_batch_create_params, file_batch_list_files_params
2222
from ...types.vector_stores.vector_store_file import VectorStoreFile
2323
from ...types.vector_stores.vector_store_file_batches import VectorStoreFileBatches
2424

@@ -131,7 +131,43 @@ def retrieve(
131131
cast_to=VectorStoreFileBatches,
132132
)
133133

134-
def list(
134+
def cancel(
135+
self,
136+
batch_id: str,
137+
*,
138+
vector_store_id: str,
139+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
140+
# The extra values given here take precedence over values defined on the client or passed to this method.
141+
extra_headers: Headers | None = None,
142+
extra_query: Query | None = None,
143+
extra_body: Body | None = None,
144+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
145+
) -> VectorStoreFileBatches:
146+
"""
147+
Cancels a vector store file batch.
148+
149+
Args:
150+
extra_headers: Send extra headers
151+
152+
extra_query: Add additional query parameters to the request
153+
154+
extra_body: Add additional JSON properties to the request
155+
156+
timeout: Override the client-level default timeout for this request, in seconds
157+
"""
158+
if not vector_store_id:
159+
raise ValueError(f"Expected a non-empty value for `vector_store_id` but received {vector_store_id!r}")
160+
if not batch_id:
161+
raise ValueError(f"Expected a non-empty value for `batch_id` but received {batch_id!r}")
162+
return self._post(
163+
f"/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel",
164+
options=make_request_options(
165+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
166+
),
167+
cast_to=VectorStoreFileBatches,
168+
)
169+
170+
def list_files(
135171
self,
136172
batch_id: str,
137173
*,
@@ -194,48 +230,12 @@ def list(
194230
"limit": limit,
195231
"order": order,
196232
},
197-
file_batch_list_params.FileBatchListParams,
233+
file_batch_list_files_params.FileBatchListFilesParams,
198234
),
199235
),
200236
model=VectorStoreFile,
201237
)
202238

203-
def cancel(
204-
self,
205-
batch_id: str,
206-
*,
207-
vector_store_id: str,
208-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
209-
# The extra values given here take precedence over values defined on the client or passed to this method.
210-
extra_headers: Headers | None = None,
211-
extra_query: Query | None = None,
212-
extra_body: Body | None = None,
213-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
214-
) -> VectorStoreFileBatches:
215-
"""
216-
Cancels a vector store file batch.
217-
218-
Args:
219-
extra_headers: Send extra headers
220-
221-
extra_query: Add additional query parameters to the request
222-
223-
extra_body: Add additional JSON properties to the request
224-
225-
timeout: Override the client-level default timeout for this request, in seconds
226-
"""
227-
if not vector_store_id:
228-
raise ValueError(f"Expected a non-empty value for `vector_store_id` but received {vector_store_id!r}")
229-
if not batch_id:
230-
raise ValueError(f"Expected a non-empty value for `batch_id` but received {batch_id!r}")
231-
return self._post(
232-
f"/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel",
233-
options=make_request_options(
234-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
235-
),
236-
cast_to=VectorStoreFileBatches,
237-
)
238-
239239

240240
class AsyncFileBatchesResource(AsyncAPIResource):
241241
@cached_property
@@ -343,7 +343,43 @@ async def retrieve(
343343
cast_to=VectorStoreFileBatches,
344344
)
345345

346-
def list(
346+
async def cancel(
347+
self,
348+
batch_id: str,
349+
*,
350+
vector_store_id: str,
351+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
352+
# The extra values given here take precedence over values defined on the client or passed to this method.
353+
extra_headers: Headers | None = None,
354+
extra_query: Query | None = None,
355+
extra_body: Body | None = None,
356+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
357+
) -> VectorStoreFileBatches:
358+
"""
359+
Cancels a vector store file batch.
360+
361+
Args:
362+
extra_headers: Send extra headers
363+
364+
extra_query: Add additional query parameters to the request
365+
366+
extra_body: Add additional JSON properties to the request
367+
368+
timeout: Override the client-level default timeout for this request, in seconds
369+
"""
370+
if not vector_store_id:
371+
raise ValueError(f"Expected a non-empty value for `vector_store_id` but received {vector_store_id!r}")
372+
if not batch_id:
373+
raise ValueError(f"Expected a non-empty value for `batch_id` but received {batch_id!r}")
374+
return await self._post(
375+
f"/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel",
376+
options=make_request_options(
377+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
378+
),
379+
cast_to=VectorStoreFileBatches,
380+
)
381+
382+
def list_files(
347383
self,
348384
batch_id: str,
349385
*,
@@ -406,48 +442,12 @@ def list(
406442
"limit": limit,
407443
"order": order,
408444
},
409-
file_batch_list_params.FileBatchListParams,
445+
file_batch_list_files_params.FileBatchListFilesParams,
410446
),
411447
),
412448
model=VectorStoreFile,
413449
)
414450

415-
async def cancel(
416-
self,
417-
batch_id: str,
418-
*,
419-
vector_store_id: str,
420-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
421-
# The extra values given here take precedence over values defined on the client or passed to this method.
422-
extra_headers: Headers | None = None,
423-
extra_query: Query | None = None,
424-
extra_body: Body | None = None,
425-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
426-
) -> VectorStoreFileBatches:
427-
"""
428-
Cancels a vector store file batch.
429-
430-
Args:
431-
extra_headers: Send extra headers
432-
433-
extra_query: Add additional query parameters to the request
434-
435-
extra_body: Add additional JSON properties to the request
436-
437-
timeout: Override the client-level default timeout for this request, in seconds
438-
"""
439-
if not vector_store_id:
440-
raise ValueError(f"Expected a non-empty value for `vector_store_id` but received {vector_store_id!r}")
441-
if not batch_id:
442-
raise ValueError(f"Expected a non-empty value for `batch_id` but received {batch_id!r}")
443-
return await self._post(
444-
f"/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel",
445-
options=make_request_options(
446-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
447-
),
448-
cast_to=VectorStoreFileBatches,
449-
)
450-
451451

452452
class FileBatchesResourceWithRawResponse:
453453
def __init__(self, file_batches: FileBatchesResource) -> None:
@@ -459,12 +459,12 @@ def __init__(self, file_batches: FileBatchesResource) -> None:
459459
self.retrieve = to_raw_response_wrapper(
460460
file_batches.retrieve,
461461
)
462-
self.list = to_raw_response_wrapper(
463-
file_batches.list,
464-
)
465462
self.cancel = to_raw_response_wrapper(
466463
file_batches.cancel,
467464
)
465+
self.list_files = to_raw_response_wrapper(
466+
file_batches.list_files,
467+
)
468468

469469

470470
class AsyncFileBatchesResourceWithRawResponse:
@@ -477,12 +477,12 @@ def __init__(self, file_batches: AsyncFileBatchesResource) -> None:
477477
self.retrieve = async_to_raw_response_wrapper(
478478
file_batches.retrieve,
479479
)
480-
self.list = async_to_raw_response_wrapper(
481-
file_batches.list,
482-
)
483480
self.cancel = async_to_raw_response_wrapper(
484481
file_batches.cancel,
485482
)
483+
self.list_files = async_to_raw_response_wrapper(
484+
file_batches.list_files,
485+
)
486486

487487

488488
class FileBatchesResourceWithStreamingResponse:
@@ -495,12 +495,12 @@ def __init__(self, file_batches: FileBatchesResource) -> None:
495495
self.retrieve = to_streamed_response_wrapper(
496496
file_batches.retrieve,
497497
)
498-
self.list = to_streamed_response_wrapper(
499-
file_batches.list,
500-
)
501498
self.cancel = to_streamed_response_wrapper(
502499
file_batches.cancel,
503500
)
501+
self.list_files = to_streamed_response_wrapper(
502+
file_batches.list_files,
503+
)
504504

505505

506506
class AsyncFileBatchesResourceWithStreamingResponse:
@@ -513,9 +513,9 @@ def __init__(self, file_batches: AsyncFileBatchesResource) -> None:
513513
self.retrieve = async_to_streamed_response_wrapper(
514514
file_batches.retrieve,
515515
)
516-
self.list = async_to_streamed_response_wrapper(
517-
file_batches.list,
518-
)
519516
self.cancel = async_to_streamed_response_wrapper(
520517
file_batches.cancel,
521518
)
519+
self.list_files = async_to_streamed_response_wrapper(
520+
file_batches.list_files,
521+
)

src/llama_stack_client/types/vector_stores/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
from .file_update_params import FileUpdateParams as FileUpdateParams
99
from .file_delete_response import FileDeleteResponse as FileDeleteResponse
1010
from .file_content_response import FileContentResponse as FileContentResponse
11-
from .file_batch_list_params import FileBatchListParams as FileBatchListParams
1211
from .file_batch_create_params import FileBatchCreateParams as FileBatchCreateParams
1312
from .vector_store_file_batches import VectorStoreFileBatches as VectorStoreFileBatches
13+
from .file_batch_list_files_params import FileBatchListFilesParams as FileBatchListFilesParams
1414
from .list_vector_store_files_in_batch_response import (
1515
ListVectorStoreFilesInBatchResponse as ListVectorStoreFilesInBatchResponse,
1616
)

src/llama_stack_client/types/vector_stores/file_batch_list_params.py renamed to src/llama_stack_client/types/vector_stores/file_batch_list_files_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
from typing_extensions import Required, TypedDict
66

7-
__all__ = ["FileBatchListParams"]
7+
__all__ = ["FileBatchListFilesParams"]
88

99

10-
class FileBatchListParams(TypedDict, total=False):
10+
class FileBatchListFilesParams(TypedDict, total=False):
1111
vector_store_id: Required[str]
1212

1313
after: str

0 commit comments

Comments
 (0)