Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.3.0-alpha.2"
".": "0.3.0-alpha.3"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 109
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-4337a6181c2db17737133e944b4b660a5e00ea10dce6be3252918e39451e9b5f.yml
openapi_spec_hash: a0bc8f4b5f45bc5741fed8eaa61171c3
config_hash: d8706905bf16d9e4141e88d5a778263b
config_hash: 0412cd40c0609550c1a47c69dd104e4f
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.3.0-alpha.3 (2025-09-30)

Full Changelog: [v0.3.0-alpha.2...v0.3.0-alpha.3](https://github.com/llamastack/llama-stack-client-python/compare/v0.3.0-alpha.2...v0.3.0-alpha.3)

### Features

* **api:** fix file batches SDK to list_files ([9808a5b](https://github.com/llamastack/llama-stack-client-python/commit/9808a5bc904a7e727bd003f85ec520047e6ac033))

## 0.3.0-alpha.2 (2025-09-30)

Full Changelog: [v0.3.0-alpha.1...v0.3.0-alpha.2](https://github.com/llamastack/llama-stack-client-python/compare/v0.3.0-alpha.1...v0.3.0-alpha.2)
Expand Down
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ Methods:

- <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>
- <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>
- <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>
- <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>
- <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>

# Models

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "llama_stack_client"
version = "0.3.0-alpha.2"
version = "0.3.0-alpha.3"
description = "The official Python library for the llama-stack-client API"
dynamic = ["readme"]
license = "MIT"
Expand Down
178 changes: 89 additions & 89 deletions src/llama_stack_client/resources/vector_stores/file_batches.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
)
from ...pagination import SyncOpenAICursorPage, AsyncOpenAICursorPage
from ..._base_client import AsyncPaginator, make_request_options
from ...types.vector_stores import file_batch_list_params, file_batch_create_params
from ...types.vector_stores import file_batch_create_params, file_batch_list_files_params
from ...types.vector_stores.vector_store_file import VectorStoreFile
from ...types.vector_stores.vector_store_file_batches import VectorStoreFileBatches

Expand Down Expand Up @@ -131,7 +131,43 @@ def retrieve(
cast_to=VectorStoreFileBatches,
)

def list(
def cancel(
self,
batch_id: str,
*,
vector_store_id: str,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> VectorStoreFileBatches:
"""
Cancels a vector store file batch.

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not vector_store_id:
raise ValueError(f"Expected a non-empty value for `vector_store_id` but received {vector_store_id!r}")
if not batch_id:
raise ValueError(f"Expected a non-empty value for `batch_id` but received {batch_id!r}")
return self._post(
f"/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=VectorStoreFileBatches,
)

def list_files(
self,
batch_id: str,
*,
Expand Down Expand Up @@ -194,48 +230,12 @@ def list(
"limit": limit,
"order": order,
},
file_batch_list_params.FileBatchListParams,
file_batch_list_files_params.FileBatchListFilesParams,
),
),
model=VectorStoreFile,
)

def cancel(
self,
batch_id: str,
*,
vector_store_id: str,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> VectorStoreFileBatches:
"""
Cancels a vector store file batch.

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not vector_store_id:
raise ValueError(f"Expected a non-empty value for `vector_store_id` but received {vector_store_id!r}")
if not batch_id:
raise ValueError(f"Expected a non-empty value for `batch_id` but received {batch_id!r}")
return self._post(
f"/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=VectorStoreFileBatches,
)


class AsyncFileBatchesResource(AsyncAPIResource):
@cached_property
Expand Down Expand Up @@ -343,7 +343,43 @@ async def retrieve(
cast_to=VectorStoreFileBatches,
)

def list(
async def cancel(
self,
batch_id: str,
*,
vector_store_id: str,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> VectorStoreFileBatches:
"""
Cancels a vector store file batch.

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not vector_store_id:
raise ValueError(f"Expected a non-empty value for `vector_store_id` but received {vector_store_id!r}")
if not batch_id:
raise ValueError(f"Expected a non-empty value for `batch_id` but received {batch_id!r}")
return await self._post(
f"/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=VectorStoreFileBatches,
)

def list_files(
self,
batch_id: str,
*,
Expand Down Expand Up @@ -406,48 +442,12 @@ def list(
"limit": limit,
"order": order,
},
file_batch_list_params.FileBatchListParams,
file_batch_list_files_params.FileBatchListFilesParams,
),
),
model=VectorStoreFile,
)

async def cancel(
self,
batch_id: str,
*,
vector_store_id: str,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> VectorStoreFileBatches:
"""
Cancels a vector store file batch.

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not vector_store_id:
raise ValueError(f"Expected a non-empty value for `vector_store_id` but received {vector_store_id!r}")
if not batch_id:
raise ValueError(f"Expected a non-empty value for `batch_id` but received {batch_id!r}")
return await self._post(
f"/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=VectorStoreFileBatches,
)


class FileBatchesResourceWithRawResponse:
def __init__(self, file_batches: FileBatchesResource) -> None:
Expand All @@ -459,12 +459,12 @@ def __init__(self, file_batches: FileBatchesResource) -> None:
self.retrieve = to_raw_response_wrapper(
file_batches.retrieve,
)
self.list = to_raw_response_wrapper(
file_batches.list,
)
self.cancel = to_raw_response_wrapper(
file_batches.cancel,
)
self.list_files = to_raw_response_wrapper(
file_batches.list_files,
)


class AsyncFileBatchesResourceWithRawResponse:
Expand All @@ -477,12 +477,12 @@ def __init__(self, file_batches: AsyncFileBatchesResource) -> None:
self.retrieve = async_to_raw_response_wrapper(
file_batches.retrieve,
)
self.list = async_to_raw_response_wrapper(
file_batches.list,
)
self.cancel = async_to_raw_response_wrapper(
file_batches.cancel,
)
self.list_files = async_to_raw_response_wrapper(
file_batches.list_files,
)


class FileBatchesResourceWithStreamingResponse:
Expand All @@ -495,12 +495,12 @@ def __init__(self, file_batches: FileBatchesResource) -> None:
self.retrieve = to_streamed_response_wrapper(
file_batches.retrieve,
)
self.list = to_streamed_response_wrapper(
file_batches.list,
)
self.cancel = to_streamed_response_wrapper(
file_batches.cancel,
)
self.list_files = to_streamed_response_wrapper(
file_batches.list_files,
)


class AsyncFileBatchesResourceWithStreamingResponse:
Expand All @@ -513,9 +513,9 @@ def __init__(self, file_batches: AsyncFileBatchesResource) -> None:
self.retrieve = async_to_streamed_response_wrapper(
file_batches.retrieve,
)
self.list = async_to_streamed_response_wrapper(
file_batches.list,
)
self.cancel = async_to_streamed_response_wrapper(
file_batches.cancel,
)
self.list_files = async_to_streamed_response_wrapper(
file_batches.list_files,
)
2 changes: 1 addition & 1 deletion src/llama_stack_client/types/vector_stores/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
from .file_update_params import FileUpdateParams as FileUpdateParams
from .file_delete_response import FileDeleteResponse as FileDeleteResponse
from .file_content_response import FileContentResponse as FileContentResponse
from .file_batch_list_params import FileBatchListParams as FileBatchListParams
from .file_batch_create_params import FileBatchCreateParams as FileBatchCreateParams
from .vector_store_file_batches import VectorStoreFileBatches as VectorStoreFileBatches
from .file_batch_list_files_params import FileBatchListFilesParams as FileBatchListFilesParams
from .list_vector_store_files_in_batch_response import (
ListVectorStoreFilesInBatchResponse as ListVectorStoreFilesInBatchResponse,
)
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

from typing_extensions import Required, TypedDict

__all__ = ["FileBatchListParams"]
__all__ = ["FileBatchListFilesParams"]


class FileBatchListParams(TypedDict, total=False):
class FileBatchListFilesParams(TypedDict, total=False):
vector_store_id: Required[str]

after: str
Expand Down
Loading
Loading