From b24bf2302314795ab0e7748eac1720d73c5fe958 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 13:03:00 +0000 Subject: [PATCH 1/3] feat(api): update via SDK Studio --- .stats.yml | 4 +- README.md | 65 ------------------- api.md | 23 ++++--- .../resources/data_sources/connectors.py | 42 +++++++----- .../resources/data_sources/data_sources.py | 42 +++++++----- src/mixedbread/resources/files.py | 44 +++++++------ src/mixedbread/resources/parsing/jobs.py | 41 +++++++----- .../resources/vector_stores/files.py | 51 ++++++++++----- .../resources/vector_stores/vector_stores.py | 42 +++++++----- src/mixedbread/types/__init__.py | 3 + .../types/data_source_list_params.py | 8 ++- .../types/data_source_list_response.py | 37 +++++++++++ src/mixedbread/types/data_sources/__init__.py | 1 + .../data_sources/connector_list_params.py | 8 ++- .../data_sources/connector_list_response.py | 37 +++++++++++ src/mixedbread/types/file_list_params.py | 8 ++- src/mixedbread/types/file_list_response.py | 37 +++++++++++ .../types/parsing/job_list_params.py | 8 ++- .../types/parsing/job_list_response.py | 34 +++++++++- .../types/vector_store_list_params.py | 7 +- .../types/vector_store_list_response.py | 37 +++++++++++ .../types/vector_stores/__init__.py | 1 + .../types/vector_stores/file_list_params.py | 13 +++- .../types/vector_stores/file_list_response.py | 37 +++++++++++ .../data_sources/test_connectors.py | 24 +++---- tests/api_resources/parsing/test_jobs.py | 23 +++---- tests/api_resources/test_data_sources.py | 24 +++---- tests/api_resources/test_files.py | 29 +++++---- tests/api_resources/test_vector_stores.py | 24 +++---- .../api_resources/vector_stores/test_files.py | 26 ++++---- 30 files changed, 514 insertions(+), 266 deletions(-) create mode 100644 src/mixedbread/types/data_source_list_response.py create mode 100644 src/mixedbread/types/data_sources/connector_list_response.py create mode 100644 src/mixedbread/types/file_list_response.py create mode 100644 src/mixedbread/types/vector_store_list_response.py create mode 100644 src/mixedbread/types/vector_stores/file_list_response.py diff --git a/.stats.yml b/.stats.yml index f54fc2cc..aea82ac0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 49 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-e3a6c9f052ee6bdfe6eb3db18628fd95c5c9bf18a656089f5f0add0490b90763.yml -openapi_spec_hash: d3c1aa7b05aa7395dc80a2a72cbbbd84 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-fd1562786a889e981d7d9b30d7f4b29d3d2ea11a8c30e19b919fae07ea355ccd.yml +openapi_spec_hash: bed820af5a3ec78f236f707f63293d47 config_hash: ca0dfb431a44ea42464c42b224addf36 diff --git a/README.md b/README.md index 901b0d7d..8bfd5cf1 100644 --- a/README.md +++ b/README.md @@ -109,71 +109,6 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`. -## Pagination - -List methods in the Mixedbread API are paginated. - -This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually: - -```python -from mixedbread import Mixedbread - -client = Mixedbread() - -all_vector_stores = [] -# Automatically fetches more pages as needed. -for vector_store in client.vector_stores.list(): - # Do something with vector_store here - all_vector_stores.append(vector_store) -print(all_vector_stores) -``` - -Or, asynchronously: - -```python -import asyncio -from mixedbread import AsyncMixedbread - -client = AsyncMixedbread() - - -async def main() -> None: - all_vector_stores = [] - # Iterate through items across all pages, issuing requests as needed. - async for vector_store in client.vector_stores.list(): - all_vector_stores.append(vector_store) - print(all_vector_stores) - - -asyncio.run(main()) -``` - -Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages: - -```python -first_page = await client.vector_stores.list() -if first_page.has_next_page(): - print(f"will fetch next page using these details: {first_page.next_page_info()}") - next_page = await first_page.get_next_page() - print(f"number of items we just fetched: {len(next_page.data)}") - -# Remove `await` for non-async usage. -``` - -Or just work directly with the returned data: - -```python -first_page = await client.vector_stores.list() - -print( - f"the current start offset for this page: {first_page.pagination.offset}" -) # => "the current start offset for this page: 1" -for vector_store in first_page.data: - print(vector_store.id) - -# Remove `await` for non-async usage. -``` - ## Nested params Nested parameters are dictionaries, typed using `TypedDict`, for example: diff --git a/api.md b/api.md index 20463369..71c47d0b 100644 --- a/api.md +++ b/api.md @@ -37,6 +37,7 @@ from mixedbread.types import ( ScoredVideoURLInputChunk, VectorStore, VectorStoreChunkSearchOptions, + VectorStoreListResponse, VectorStoreDeleteResponse, VectorStoreQuestionAnsweringResponse, VectorStoreSearchResponse, @@ -48,7 +49,7 @@ Methods: - client.vector_stores.create(\*\*params) -> VectorStore - client.vector_stores.retrieve(vector_store_identifier) -> VectorStore - client.vector_stores.update(vector_store_identifier, \*\*params) -> VectorStore -- client.vector_stores.list(\*\*params) -> SyncLimitOffset[VectorStore] +- client.vector_stores.list(\*\*params) -> VectorStoreListResponse - client.vector_stores.delete(vector_store_identifier) -> VectorStoreDeleteResponse - client.vector_stores.question_answering(\*\*params) -> VectorStoreQuestionAnsweringResponse - client.vector_stores.search(\*\*params) -> VectorStoreSearchResponse @@ -63,6 +64,7 @@ from mixedbread.types.vector_stores import ( ScoredVectorStoreFile, VectorStoreFileStatus, VectorStoreFile, + FileListResponse, FileDeleteResponse, FileSearchResponse, ) @@ -72,7 +74,7 @@ Methods: - client.vector_stores.files.create(vector_store_identifier, \*\*params) -> VectorStoreFile - client.vector_stores.files.retrieve(file_id, \*, vector_store_identifier) -> VectorStoreFile -- client.vector_stores.files.list(vector_store_identifier, \*\*params) -> SyncLimitOffset[VectorStoreFile] +- client.vector_stores.files.list(vector_store_identifier, \*\*params) -> FileListResponse - client.vector_stores.files.delete(file_id, \*, vector_store_identifier) -> FileDeleteResponse - client.vector_stores.files.search(\*\*params) -> FileSearchResponse @@ -98,7 +100,7 @@ Methods: - client.parsing.jobs.create(\*\*params) -> ParsingJob - client.parsing.jobs.retrieve(job_id) -> ParsingJob -- client.parsing.jobs.list(\*\*params) -> SyncLimitOffset[JobListResponse] +- client.parsing.jobs.list(\*\*params) -> JobListResponse - client.parsing.jobs.delete(job_id) -> JobDeleteResponse - client.parsing.jobs.cancel(job_id) -> ParsingJob @@ -107,7 +109,7 @@ Methods: Types: ```python -from mixedbread.types import FileObject, PaginationWithTotal, FileDeleteResponse +from mixedbread.types import FileObject, PaginationWithTotal, FileListResponse, FileDeleteResponse ``` Methods: @@ -115,7 +117,7 @@ Methods: - client.files.create(\*\*params) -> FileObject - client.files.retrieve(file_id) -> FileObject - client.files.update(file_id, \*\*params) -> FileObject -- client.files.list(\*\*params) -> SyncLimitOffset[FileObject] +- client.files.list(\*\*params) -> FileListResponse - client.files.delete(file_id) -> FileDeleteResponse - client.files.content(file_id) -> BinaryAPIResponse @@ -184,6 +186,7 @@ from mixedbread.types import ( LinearDataSource, NotionDataSource, Oauth2Params, + DataSourceListResponse, DataSourceDeleteResponse, ) ``` @@ -193,7 +196,7 @@ Methods: - client.data_sources.create(\*\*params) -> DataSource - client.data_sources.retrieve(data_source_id) -> DataSource - client.data_sources.update(data_source_id, \*\*params) -> DataSource -- client.data_sources.list(\*\*params) -> SyncLimitOffset[DataSource] +- client.data_sources.list(\*\*params) -> DataSourceListResponse - client.data_sources.delete(data_source_id) -> DataSourceDeleteResponse ## Connectors @@ -201,7 +204,11 @@ Methods: Types: ```python -from mixedbread.types.data_sources import DataSourceConnector, ConnectorDeleteResponse +from mixedbread.types.data_sources import ( + DataSourceConnector, + ConnectorListResponse, + ConnectorDeleteResponse, +) ``` Methods: @@ -209,7 +216,7 @@ Methods: - client.data_sources.connectors.create(data_source_id, \*\*params) -> DataSourceConnector - client.data_sources.connectors.retrieve(connector_id, \*, data_source_id) -> DataSourceConnector - client.data_sources.connectors.update(connector_id, \*, data_source_id, \*\*params) -> DataSourceConnector -- client.data_sources.connectors.list(data_source_id, \*\*params) -> SyncLimitOffset[DataSourceConnector] +- client.data_sources.connectors.list(data_source_id, \*\*params) -> ConnectorListResponse - client.data_sources.connectors.delete(connector_id, \*, data_source_id) -> ConnectorDeleteResponse # APIKeys diff --git a/src/mixedbread/resources/data_sources/connectors.py b/src/mixedbread/resources/data_sources/connectors.py index c9ab8400..fd110748 100644 --- a/src/mixedbread/resources/data_sources/connectors.py +++ b/src/mixedbread/resources/data_sources/connectors.py @@ -16,10 +16,10 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...pagination import SyncLimitOffset, AsyncLimitOffset -from ..._base_client import AsyncPaginator, make_request_options +from ..._base_client import make_request_options from ...types.data_sources import connector_list_params, connector_create_params, connector_update_params from ...types.data_sources.data_source_connector import DataSourceConnector +from ...types.data_sources.connector_list_response import ConnectorListResponse from ...types.data_sources.connector_delete_response import ConnectorDeleteResponse __all__ = ["ConnectorsResource", "AsyncConnectorsResource"] @@ -237,14 +237,15 @@ def list( data_source_id: str, *, limit: int | NotGiven = NOT_GIVEN, - offset: int | NotGiven = NOT_GIVEN, + cursor: Optional[str] | NotGiven = NOT_GIVEN, + include_total: bool | NotGiven = NOT_GIVEN, # 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, - ) -> SyncLimitOffset[DataSourceConnector]: + ) -> ConnectorListResponse: """ Get all connectors for a data source. @@ -258,7 +259,9 @@ def list( limit: Maximum number of items to return per page - offset: Offset of the first item to return + cursor: Cursor for pagination (base64 encoded cursor) + + include_total: Whether to include the total number of items extra_headers: Send extra headers @@ -270,9 +273,8 @@ def list( """ if not data_source_id: raise ValueError(f"Expected a non-empty value for `data_source_id` but received {data_source_id!r}") - return self._get_api_list( + return self._get( f"/v1/data_sources/{data_source_id}/connectors", - page=SyncLimitOffset[DataSourceConnector], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -281,12 +283,13 @@ def list( query=maybe_transform( { "limit": limit, - "offset": offset, + "cursor": cursor, + "include_total": include_total, }, connector_list_params.ConnectorListParams, ), ), - model=DataSourceConnector, + cast_to=ConnectorListResponse, ) def delete( @@ -542,19 +545,20 @@ async def update( cast_to=DataSourceConnector, ) - def list( + async def list( self, data_source_id: str, *, limit: int | NotGiven = NOT_GIVEN, - offset: int | NotGiven = NOT_GIVEN, + cursor: Optional[str] | NotGiven = NOT_GIVEN, + include_total: bool | NotGiven = NOT_GIVEN, # 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, - ) -> AsyncPaginator[DataSourceConnector, AsyncLimitOffset[DataSourceConnector]]: + ) -> ConnectorListResponse: """ Get all connectors for a data source. @@ -568,7 +572,9 @@ def list( limit: Maximum number of items to return per page - offset: Offset of the first item to return + cursor: Cursor for pagination (base64 encoded cursor) + + include_total: Whether to include the total number of items extra_headers: Send extra headers @@ -580,23 +586,23 @@ def list( """ if not data_source_id: raise ValueError(f"Expected a non-empty value for `data_source_id` but received {data_source_id!r}") - return self._get_api_list( + return await self._get( f"/v1/data_sources/{data_source_id}/connectors", - page=AsyncLimitOffset[DataSourceConnector], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "limit": limit, - "offset": offset, + "cursor": cursor, + "include_total": include_total, }, connector_list_params.ConnectorListParams, ), ), - model=DataSourceConnector, + cast_to=ConnectorListResponse, ) async def delete( diff --git a/src/mixedbread/resources/data_sources/data_sources.py b/src/mixedbread/resources/data_sources/data_sources.py index d1fcf526..d82939db 100644 --- a/src/mixedbread/resources/data_sources/data_sources.py +++ b/src/mixedbread/resources/data_sources/data_sources.py @@ -32,11 +32,11 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...pagination import SyncLimitOffset, AsyncLimitOffset -from ..._base_client import AsyncPaginator, make_request_options +from ..._base_client import make_request_options from ...types.data_source import DataSource from ...types.oauth2_params import Oauth2Params from ...types.data_source_type import DataSourceType +from ...types.data_source_list_response import DataSourceListResponse from ...types.data_source_delete_response import DataSourceDeleteResponse __all__ = ["DataSourcesResource", "AsyncDataSourcesResource"] @@ -356,14 +356,15 @@ def list( self, *, limit: int | NotGiven = NOT_GIVEN, - offset: int | NotGiven = NOT_GIVEN, + cursor: Optional[str] | NotGiven = NOT_GIVEN, + include_total: bool | NotGiven = NOT_GIVEN, # 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, - ) -> SyncLimitOffset[DataSource]: + ) -> DataSourceListResponse: """ Get all data sources. @@ -372,7 +373,9 @@ def list( Args: limit: Maximum number of items to return per page - offset: Offset of the first item to return + cursor: Cursor for pagination (base64 encoded cursor) + + include_total: Whether to include the total number of items extra_headers: Send extra headers @@ -382,9 +385,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/v1/data_sources/", - page=SyncLimitOffset[DataSource], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -393,12 +395,13 @@ def list( query=maybe_transform( { "limit": limit, - "offset": offset, + "cursor": cursor, + "include_total": include_total, }, data_source_list_params.DataSourceListParams, ), ), - model=DataSource, + cast_to=DataSourceListResponse, ) def delete( @@ -749,18 +752,19 @@ async def update( cast_to=DataSource, ) - def list( + async def list( self, *, limit: int | NotGiven = NOT_GIVEN, - offset: int | NotGiven = NOT_GIVEN, + cursor: Optional[str] | NotGiven = NOT_GIVEN, + include_total: bool | NotGiven = NOT_GIVEN, # 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, - ) -> AsyncPaginator[DataSource, AsyncLimitOffset[DataSource]]: + ) -> DataSourceListResponse: """ Get all data sources. @@ -769,7 +773,9 @@ def list( Args: limit: Maximum number of items to return per page - offset: Offset of the first item to return + cursor: Cursor for pagination (base64 encoded cursor) + + include_total: Whether to include the total number of items extra_headers: Send extra headers @@ -779,23 +785,23 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/v1/data_sources/", - page=AsyncLimitOffset[DataSource], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "limit": limit, - "offset": offset, + "cursor": cursor, + "include_total": include_total, }, data_source_list_params.DataSourceListParams, ), ), - model=DataSource, + cast_to=DataSourceListResponse, ) async def delete( diff --git a/src/mixedbread/resources/files.py b/src/mixedbread/resources/files.py index 43cafa7d..207336ac 100644 --- a/src/mixedbread/resources/files.py +++ b/src/mixedbread/resources/files.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Mapping, cast +from typing import Mapping, Optional, cast import httpx @@ -25,9 +25,9 @@ async_to_custom_raw_response_wrapper, async_to_custom_streamed_response_wrapper, ) -from ..pagination import SyncLimitOffset, AsyncLimitOffset -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.file_object import FileObject +from ..types.file_list_response import FileListResponse from ..types.file_delete_response import FileDeleteResponse __all__ = ["FilesResource", "AsyncFilesResource"] @@ -191,14 +191,15 @@ def list( self, *, limit: int | NotGiven = NOT_GIVEN, - offset: int | NotGiven = NOT_GIVEN, + cursor: Optional[str] | NotGiven = NOT_GIVEN, + include_total: bool | NotGiven = NOT_GIVEN, # 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, - ) -> SyncLimitOffset[FileObject]: + ) -> FileListResponse: """ List all files for the authenticated user. @@ -209,7 +210,9 @@ def list( Args: limit: Maximum number of items to return per page - offset: Offset of the first item to return + cursor: Cursor for pagination (base64 encoded cursor) + + include_total: Whether to include the total number of items extra_headers: Send extra headers @@ -219,9 +222,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/v1/files", - page=SyncLimitOffset[FileObject], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -230,12 +232,13 @@ def list( query=maybe_transform( { "limit": limit, - "offset": offset, + "cursor": cursor, + "include_total": include_total, }, file_list_params.FileListParams, ), ), - model=FileObject, + cast_to=FileListResponse, ) def delete( @@ -472,18 +475,19 @@ async def update( cast_to=FileObject, ) - def list( + async def list( self, *, limit: int | NotGiven = NOT_GIVEN, - offset: int | NotGiven = NOT_GIVEN, + cursor: Optional[str] | NotGiven = NOT_GIVEN, + include_total: bool | NotGiven = NOT_GIVEN, # 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, - ) -> AsyncPaginator[FileObject, AsyncLimitOffset[FileObject]]: + ) -> FileListResponse: """ List all files for the authenticated user. @@ -494,7 +498,9 @@ def list( Args: limit: Maximum number of items to return per page - offset: Offset of the first item to return + cursor: Cursor for pagination (base64 encoded cursor) + + include_total: Whether to include the total number of items extra_headers: Send extra headers @@ -504,23 +510,23 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/v1/files", - page=AsyncLimitOffset[FileObject], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "limit": limit, - "offset": offset, + "cursor": cursor, + "include_total": include_total, }, file_list_params.FileListParams, ), ), - model=FileObject, + cast_to=FileListResponse, ) async def delete( diff --git a/src/mixedbread/resources/parsing/jobs.py b/src/mixedbread/resources/parsing/jobs.py index d0b9f77a..1cbe0b7a 100644 --- a/src/mixedbread/resources/parsing/jobs.py +++ b/src/mixedbread/resources/parsing/jobs.py @@ -19,8 +19,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...pagination import SyncLimitOffset, AsyncLimitOffset -from ..._base_client import AsyncPaginator, make_request_options +from ..._base_client import make_request_options from ...types.parsing import ReturnFormat, ChunkingStrategy, job_list_params, job_create_params from ...types.parsing.parsing_job import ParsingJob from ...types.parsing.element_type import ElementType @@ -154,14 +153,15 @@ def list( self, *, limit: int | NotGiven = NOT_GIVEN, - offset: int | NotGiven = NOT_GIVEN, + cursor: Optional[str] | NotGiven = NOT_GIVEN, + include_total: bool | NotGiven = NOT_GIVEN, # 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, - ) -> SyncLimitOffset[JobListResponse]: + ) -> JobListResponse: """List parsing jobs with pagination. Args: limit: The number of items to return. @@ -173,7 +173,9 @@ def list( Args: limit: Maximum number of items to return per page - offset: Offset of the first item to return + cursor: Cursor for pagination (base64 encoded cursor) + + include_total: Whether to include the total number of items extra_headers: Send extra headers @@ -183,9 +185,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/v1/parsing/jobs", - page=SyncLimitOffset[JobListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -194,12 +195,13 @@ def list( query=maybe_transform( { "limit": limit, - "offset": offset, + "cursor": cursor, + "include_total": include_total, }, job_list_params.JobListParams, ), ), - model=JobListResponse, + cast_to=JobListResponse, ) def delete( @@ -556,18 +558,19 @@ async def retrieve( cast_to=ParsingJob, ) - def list( + async def list( self, *, limit: int | NotGiven = NOT_GIVEN, - offset: int | NotGiven = NOT_GIVEN, + cursor: Optional[str] | NotGiven = NOT_GIVEN, + include_total: bool | NotGiven = NOT_GIVEN, # 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, - ) -> AsyncPaginator[JobListResponse, AsyncLimitOffset[JobListResponse]]: + ) -> JobListResponse: """List parsing jobs with pagination. Args: limit: The number of items to return. @@ -579,7 +582,9 @@ def list( Args: limit: Maximum number of items to return per page - offset: Offset of the first item to return + cursor: Cursor for pagination (base64 encoded cursor) + + include_total: Whether to include the total number of items extra_headers: Send extra headers @@ -589,23 +594,23 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/v1/parsing/jobs", - page=AsyncLimitOffset[JobListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "limit": limit, - "offset": offset, + "cursor": cursor, + "include_total": include_total, }, job_list_params.JobListParams, ), ), - model=JobListResponse, + cast_to=JobListResponse, ) async def delete( diff --git a/src/mixedbread/resources/vector_stores/files.py b/src/mixedbread/resources/vector_stores/files.py index c38b1f18..b84f574f 100644 --- a/src/mixedbread/resources/vector_stores/files.py +++ b/src/mixedbread/resources/vector_stores/files.py @@ -18,12 +18,13 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...pagination import SyncLimitOffset, AsyncLimitOffset -from ..._base_client import AsyncPaginator, make_request_options +from ..._base_client import make_request_options from ...types.vector_stores import file_list_params, file_create_params, file_search_params from ...types.vector_stores.vector_store_file import VectorStoreFile +from ...types.vector_stores.file_list_response import FileListResponse from ...types.vector_stores.file_delete_response import FileDeleteResponse from ...types.vector_stores.file_search_response import FileSearchResponse +from ...types.vector_stores.vector_store_file_status import VectorStoreFileStatus __all__ = ["FilesResource", "AsyncFilesResource"] @@ -159,14 +160,16 @@ def list( vector_store_identifier: str, *, limit: int | NotGiven = NOT_GIVEN, - offset: int | NotGiven = NOT_GIVEN, + cursor: Optional[str] | NotGiven = NOT_GIVEN, + include_total: bool | NotGiven = NOT_GIVEN, + statuses: Optional[List[VectorStoreFileStatus]] | NotGiven = NOT_GIVEN, # 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, - ) -> SyncLimitOffset[VectorStoreFile]: + ) -> FileListResponse: """ List files indexed in a vector store with pagination. @@ -180,7 +183,11 @@ def list( limit: Maximum number of items to return per page - offset: Offset of the first item to return + cursor: Cursor for pagination (base64 encoded cursor) + + include_total: Whether to include the total number of items + + statuses: Status to filter by extra_headers: Send extra headers @@ -194,9 +201,8 @@ def list( raise ValueError( f"Expected a non-empty value for `vector_store_identifier` but received {vector_store_identifier!r}" ) - return self._get_api_list( + return self._get( f"/v1/vector_stores/{vector_store_identifier}/files", - page=SyncLimitOffset[VectorStoreFile], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -205,12 +211,14 @@ def list( query=maybe_transform( { "limit": limit, - "offset": offset, + "cursor": cursor, + "include_total": include_total, + "statuses": statuses, }, file_list_params.FileListParams, ), ), - model=VectorStoreFile, + cast_to=FileListResponse, ) def delete( @@ -569,19 +577,21 @@ async def retrieve( cast_to=VectorStoreFile, ) - def list( + async def list( self, vector_store_identifier: str, *, limit: int | NotGiven = NOT_GIVEN, - offset: int | NotGiven = NOT_GIVEN, + cursor: Optional[str] | NotGiven = NOT_GIVEN, + include_total: bool | NotGiven = NOT_GIVEN, + statuses: Optional[List[VectorStoreFileStatus]] | NotGiven = NOT_GIVEN, # 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, - ) -> AsyncPaginator[VectorStoreFile, AsyncLimitOffset[VectorStoreFile]]: + ) -> FileListResponse: """ List files indexed in a vector store with pagination. @@ -595,7 +605,11 @@ def list( limit: Maximum number of items to return per page - offset: Offset of the first item to return + cursor: Cursor for pagination (base64 encoded cursor) + + include_total: Whether to include the total number of items + + statuses: Status to filter by extra_headers: Send extra headers @@ -609,23 +623,24 @@ def list( raise ValueError( f"Expected a non-empty value for `vector_store_identifier` but received {vector_store_identifier!r}" ) - return self._get_api_list( + return await self._get( f"/v1/vector_stores/{vector_store_identifier}/files", - page=AsyncLimitOffset[VectorStoreFile], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "limit": limit, - "offset": offset, + "cursor": cursor, + "include_total": include_total, + "statuses": statuses, }, file_list_params.FileListParams, ), ), - model=VectorStoreFile, + cast_to=FileListResponse, ) async def delete( diff --git a/src/mixedbread/resources/vector_stores/vector_stores.py b/src/mixedbread/resources/vector_stores/vector_stores.py index 8c125cfb..21f559df 100644 --- a/src/mixedbread/resources/vector_stores/vector_stores.py +++ b/src/mixedbread/resources/vector_stores/vector_stores.py @@ -31,10 +31,10 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...pagination import SyncLimitOffset, AsyncLimitOffset -from ..._base_client import AsyncPaginator, make_request_options +from ..._base_client import make_request_options from ...types.vector_store import VectorStore from ...types.expires_after_param import ExpiresAfterParam +from ...types.vector_store_list_response import VectorStoreListResponse from ...types.vector_store_delete_response import VectorStoreDeleteResponse from ...types.vector_store_search_response import VectorStoreSearchResponse from ...types.vector_store_chunk_search_options_param import VectorStoreChunkSearchOptionsParam @@ -244,7 +244,8 @@ def list( self, *, limit: int | NotGiven = NOT_GIVEN, - offset: int | NotGiven = NOT_GIVEN, + cursor: Optional[str] | NotGiven = NOT_GIVEN, + include_total: bool | NotGiven = NOT_GIVEN, q: Optional[str] | NotGiven = NOT_GIVEN, # 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. @@ -252,7 +253,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncLimitOffset[VectorStore]: + ) -> VectorStoreListResponse: """ List all vector stores with optional search. @@ -264,7 +265,9 @@ def list( Args: limit: Maximum number of items to return per page - offset: Offset of the first item to return + cursor: Cursor for pagination (base64 encoded cursor) + + include_total: Whether to include the total number of items q: Search query for fuzzy matching over name and description fields @@ -276,9 +279,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/v1/vector_stores", - page=SyncLimitOffset[VectorStore], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -287,13 +289,14 @@ def list( query=maybe_transform( { "limit": limit, - "offset": offset, + "cursor": cursor, + "include_total": include_total, "q": q, }, vector_store_list_params.VectorStoreListParams, ), ), - model=VectorStore, + cast_to=VectorStoreListResponse, ) def delete( @@ -683,11 +686,12 @@ async def update( cast_to=VectorStore, ) - def list( + async def list( self, *, limit: int | NotGiven = NOT_GIVEN, - offset: int | NotGiven = NOT_GIVEN, + cursor: Optional[str] | NotGiven = NOT_GIVEN, + include_total: bool | NotGiven = NOT_GIVEN, q: Optional[str] | NotGiven = NOT_GIVEN, # 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. @@ -695,7 +699,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[VectorStore, AsyncLimitOffset[VectorStore]]: + ) -> VectorStoreListResponse: """ List all vector stores with optional search. @@ -707,7 +711,9 @@ def list( Args: limit: Maximum number of items to return per page - offset: Offset of the first item to return + cursor: Cursor for pagination (base64 encoded cursor) + + include_total: Whether to include the total number of items q: Search query for fuzzy matching over name and description fields @@ -719,24 +725,24 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/v1/vector_stores", - page=AsyncLimitOffset[VectorStore], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "limit": limit, - "offset": offset, + "cursor": cursor, + "include_total": include_total, "q": q, }, vector_store_list_params.VectorStoreListParams, ), ), - model=VectorStore, + cast_to=VectorStoreListResponse, ) async def delete( diff --git a/src/mixedbread/types/__init__.py b/src/mixedbread/types/__init__.py index 5fead10f..a726eb8f 100644 --- a/src/mixedbread/types/__init__.py +++ b/src/mixedbread/types/__init__.py @@ -18,6 +18,7 @@ from .data_source_type import DataSourceType as DataSourceType from .file_list_params import FileListParams as FileListParams from .file_create_params import FileCreateParams as FileCreateParams +from .file_list_response import FileListResponse as FileListResponse from .file_update_params import FileUpdateParams as FileUpdateParams from .api_key_list_params import APIKeyListParams as APIKeyListParams from .client_embed_params import ClientEmbedParams as ClientEmbedParams @@ -35,10 +36,12 @@ from .notion_data_source_param import NotionDataSourceParam as NotionDataSourceParam from .vector_store_list_params import VectorStoreListParams as VectorStoreListParams from .data_source_create_params import DataSourceCreateParams as DataSourceCreateParams +from .data_source_list_response import DataSourceListResponse as DataSourceListResponse from .data_source_oauth2_params import DataSourceOauth2Params as DataSourceOauth2Params from .data_source_update_params import DataSourceUpdateParams as DataSourceUpdateParams from .embedding_create_response import EmbeddingCreateResponse as EmbeddingCreateResponse from .vector_store_create_params import VectorStoreCreateParams as VectorStoreCreateParams +from .vector_store_list_response import VectorStoreListResponse as VectorStoreListResponse from .vector_store_search_params import VectorStoreSearchParams as VectorStoreSearchParams from .vector_store_update_params import VectorStoreUpdateParams as VectorStoreUpdateParams from .data_source_delete_response import DataSourceDeleteResponse as DataSourceDeleteResponse diff --git a/src/mixedbread/types/data_source_list_params.py b/src/mixedbread/types/data_source_list_params.py index d6026d5d..86e27bce 100644 --- a/src/mixedbread/types/data_source_list_params.py +++ b/src/mixedbread/types/data_source_list_params.py @@ -2,6 +2,7 @@ from __future__ import annotations +from typing import Optional from typing_extensions import TypedDict __all__ = ["DataSourceListParams"] @@ -11,5 +12,8 @@ class DataSourceListParams(TypedDict, total=False): limit: int """Maximum number of items to return per page""" - offset: int - """Offset of the first item to return""" + cursor: Optional[str] + """Cursor for pagination (base64 encoded cursor)""" + + include_total: bool + """Whether to include the total number of items""" diff --git a/src/mixedbread/types/data_source_list_response.py b/src/mixedbread/types/data_source_list_response.py new file mode 100644 index 00000000..4c95ef7a --- /dev/null +++ b/src/mixedbread/types/data_source_list_response.py @@ -0,0 +1,37 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from typing_extensions import Literal + +from .._models import BaseModel +from .data_source import DataSource + +__all__ = ["DataSourceListResponse", "Pagination"] + + +class Pagination(BaseModel): + next_cursor: Optional[str] = None + """Cursor for the next page, null if no more pages""" + + prev_cursor: Optional[str] = None + """Cursor for the previous page, null if no previous pages""" + + has_more: bool + """Whether there are more items available""" + + has_prev: bool + """Whether there are previous items available""" + + total: Optional[int] = None + """Total number of items available""" + + +class DataSourceListResponse(BaseModel): + pagination: Pagination + """Response model for cursor-based pagination.""" + + data: List[DataSource] + """The list of data sources""" + + object: Optional[Literal["list"]] = None + """The object type of the response""" diff --git a/src/mixedbread/types/data_sources/__init__.py b/src/mixedbread/types/data_sources/__init__.py index c35b6f2e..c925bcc7 100644 --- a/src/mixedbread/types/data_sources/__init__.py +++ b/src/mixedbread/types/data_sources/__init__.py @@ -5,5 +5,6 @@ from .connector_list_params import ConnectorListParams as ConnectorListParams from .data_source_connector import DataSourceConnector as DataSourceConnector from .connector_create_params import ConnectorCreateParams as ConnectorCreateParams +from .connector_list_response import ConnectorListResponse as ConnectorListResponse from .connector_update_params import ConnectorUpdateParams as ConnectorUpdateParams from .connector_delete_response import ConnectorDeleteResponse as ConnectorDeleteResponse diff --git a/src/mixedbread/types/data_sources/connector_list_params.py b/src/mixedbread/types/data_sources/connector_list_params.py index deda9f22..09a46fd0 100644 --- a/src/mixedbread/types/data_sources/connector_list_params.py +++ b/src/mixedbread/types/data_sources/connector_list_params.py @@ -2,6 +2,7 @@ from __future__ import annotations +from typing import Optional from typing_extensions import TypedDict __all__ = ["ConnectorListParams"] @@ -11,5 +12,8 @@ class ConnectorListParams(TypedDict, total=False): limit: int """Maximum number of items to return per page""" - offset: int - """Offset of the first item to return""" + cursor: Optional[str] + """Cursor for pagination (base64 encoded cursor)""" + + include_total: bool + """Whether to include the total number of items""" diff --git a/src/mixedbread/types/data_sources/connector_list_response.py b/src/mixedbread/types/data_sources/connector_list_response.py new file mode 100644 index 00000000..e63cf824 --- /dev/null +++ b/src/mixedbread/types/data_sources/connector_list_response.py @@ -0,0 +1,37 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .data_source_connector import DataSourceConnector + +__all__ = ["ConnectorListResponse", "Pagination"] + + +class Pagination(BaseModel): + next_cursor: Optional[str] = None + """Cursor for the next page, null if no more pages""" + + prev_cursor: Optional[str] = None + """Cursor for the previous page, null if no previous pages""" + + has_more: bool + """Whether there are more items available""" + + has_prev: bool + """Whether there are previous items available""" + + total: Optional[int] = None + """Total number of items available""" + + +class ConnectorListResponse(BaseModel): + pagination: Pagination + """Response model for cursor-based pagination.""" + + data: List[DataSourceConnector] + """The list of connectors""" + + object: Optional[Literal["list"]] = None + """The object type of the response""" diff --git a/src/mixedbread/types/file_list_params.py b/src/mixedbread/types/file_list_params.py index 7ecfdf54..e7b9d891 100644 --- a/src/mixedbread/types/file_list_params.py +++ b/src/mixedbread/types/file_list_params.py @@ -2,6 +2,7 @@ from __future__ import annotations +from typing import Optional from typing_extensions import TypedDict __all__ = ["FileListParams"] @@ -11,5 +12,8 @@ class FileListParams(TypedDict, total=False): limit: int """Maximum number of items to return per page""" - offset: int - """Offset of the first item to return""" + cursor: Optional[str] + """Cursor for pagination (base64 encoded cursor)""" + + include_total: bool + """Whether to include the total number of items""" diff --git a/src/mixedbread/types/file_list_response.py b/src/mixedbread/types/file_list_response.py new file mode 100644 index 00000000..b66a56ad --- /dev/null +++ b/src/mixedbread/types/file_list_response.py @@ -0,0 +1,37 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from typing_extensions import Literal + +from .._models import BaseModel +from .file_object import FileObject + +__all__ = ["FileListResponse", "Pagination"] + + +class Pagination(BaseModel): + next_cursor: Optional[str] = None + """Cursor for the next page, null if no more pages""" + + prev_cursor: Optional[str] = None + """Cursor for the previous page, null if no previous pages""" + + has_more: bool + """Whether there are more items available""" + + has_prev: bool + """Whether there are previous items available""" + + total: Optional[int] = None + """Total number of items available""" + + +class FileListResponse(BaseModel): + pagination: Pagination + """Response model for cursor-based pagination.""" + + object: Optional[Literal["list"]] = None + """The object type of the response""" + + data: List[FileObject] + """The list of files""" diff --git a/src/mixedbread/types/parsing/job_list_params.py b/src/mixedbread/types/parsing/job_list_params.py index f8e7c7b0..92a016a9 100644 --- a/src/mixedbread/types/parsing/job_list_params.py +++ b/src/mixedbread/types/parsing/job_list_params.py @@ -2,6 +2,7 @@ from __future__ import annotations +from typing import Optional from typing_extensions import TypedDict __all__ = ["JobListParams"] @@ -11,5 +12,8 @@ class JobListParams(TypedDict, total=False): limit: int """Maximum number of items to return per page""" - offset: int - """Offset of the first item to return""" + cursor: Optional[str] + """Cursor for pagination (base64 encoded cursor)""" + + include_total: bool + """Whether to include the total number of items""" diff --git a/src/mixedbread/types/parsing/job_list_response.py b/src/mixedbread/types/parsing/job_list_response.py index 509d1620..b0aea3f0 100644 --- a/src/mixedbread/types/parsing/job_list_response.py +++ b/src/mixedbread/types/parsing/job_list_response.py @@ -1,16 +1,33 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import List, Optional from datetime import datetime from typing_extensions import Literal from ..._models import BaseModel from .parsing_job_status import ParsingJobStatus -__all__ = ["JobListResponse"] +__all__ = ["JobListResponse", "Pagination", "Data"] -class JobListResponse(BaseModel): +class Pagination(BaseModel): + next_cursor: Optional[str] = None + """Cursor for the next page, null if no more pages""" + + prev_cursor: Optional[str] = None + """Cursor for the previous page, null if no previous pages""" + + has_more: bool + """Whether there are more items available""" + + has_prev: bool + """Whether there are previous items available""" + + total: Optional[int] = None + """Total number of items available""" + + +class Data(BaseModel): id: str """The ID of the job""" @@ -34,3 +51,14 @@ class JobListResponse(BaseModel): object: Optional[Literal["parsing_job"]] = None """The type of the object""" + + +class JobListResponse(BaseModel): + pagination: Pagination + """Response model for cursor-based pagination.""" + + data: List[Data] + """The list of parsing jobs""" + + object: Optional[Literal["list"]] = None + """The object type of the response""" diff --git a/src/mixedbread/types/vector_store_list_params.py b/src/mixedbread/types/vector_store_list_params.py index 4f649424..d42f0b1f 100644 --- a/src/mixedbread/types/vector_store_list_params.py +++ b/src/mixedbread/types/vector_store_list_params.py @@ -12,8 +12,11 @@ class VectorStoreListParams(TypedDict, total=False): limit: int """Maximum number of items to return per page""" - offset: int - """Offset of the first item to return""" + cursor: Optional[str] + """Cursor for pagination (base64 encoded cursor)""" + + include_total: bool + """Whether to include the total number of items""" q: Optional[str] """Search query for fuzzy matching over name and description fields""" diff --git a/src/mixedbread/types/vector_store_list_response.py b/src/mixedbread/types/vector_store_list_response.py new file mode 100644 index 00000000..54664f1a --- /dev/null +++ b/src/mixedbread/types/vector_store_list_response.py @@ -0,0 +1,37 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from typing_extensions import Literal + +from .._models import BaseModel +from .vector_store import VectorStore + +__all__ = ["VectorStoreListResponse", "Pagination"] + + +class Pagination(BaseModel): + next_cursor: Optional[str] = None + """Cursor for the next page, null if no more pages""" + + prev_cursor: Optional[str] = None + """Cursor for the previous page, null if no previous pages""" + + has_more: bool + """Whether there are more items available""" + + has_prev: bool + """Whether there are previous items available""" + + total: Optional[int] = None + """Total number of items available""" + + +class VectorStoreListResponse(BaseModel): + pagination: Pagination + """Response model for cursor-based pagination.""" + + object: Optional[Literal["list"]] = None + """The object type of the response""" + + data: List[VectorStore] + """The list of vector stores""" diff --git a/src/mixedbread/types/vector_stores/__init__.py b/src/mixedbread/types/vector_stores/__init__.py index 6ce1aafe..f0cee6f2 100644 --- a/src/mixedbread/types/vector_stores/__init__.py +++ b/src/mixedbread/types/vector_stores/__init__.py @@ -5,6 +5,7 @@ from .file_list_params import FileListParams as FileListParams from .vector_store_file import VectorStoreFile as VectorStoreFile from .file_create_params import FileCreateParams as FileCreateParams +from .file_list_response import FileListResponse as FileListResponse from .file_search_params import FileSearchParams as FileSearchParams from .rerank_config_param import RerankConfigParam as RerankConfigParam from .file_delete_response import FileDeleteResponse as FileDeleteResponse diff --git a/src/mixedbread/types/vector_stores/file_list_params.py b/src/mixedbread/types/vector_stores/file_list_params.py index 7ecfdf54..105ebeff 100644 --- a/src/mixedbread/types/vector_stores/file_list_params.py +++ b/src/mixedbread/types/vector_stores/file_list_params.py @@ -2,8 +2,11 @@ from __future__ import annotations +from typing import List, Optional from typing_extensions import TypedDict +from .vector_store_file_status import VectorStoreFileStatus + __all__ = ["FileListParams"] @@ -11,5 +14,11 @@ class FileListParams(TypedDict, total=False): limit: int """Maximum number of items to return per page""" - offset: int - """Offset of the first item to return""" + cursor: Optional[str] + """Cursor for pagination (base64 encoded cursor)""" + + include_total: bool + """Whether to include the total number of items""" + + statuses: Optional[List[VectorStoreFileStatus]] + """Status to filter by""" diff --git a/src/mixedbread/types/vector_stores/file_list_response.py b/src/mixedbread/types/vector_stores/file_list_response.py new file mode 100644 index 00000000..e566de6b --- /dev/null +++ b/src/mixedbread/types/vector_stores/file_list_response.py @@ -0,0 +1,37 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .vector_store_file import VectorStoreFile + +__all__ = ["FileListResponse", "Pagination"] + + +class Pagination(BaseModel): + next_cursor: Optional[str] = None + """Cursor for the next page, null if no more pages""" + + prev_cursor: Optional[str] = None + """Cursor for the previous page, null if no previous pages""" + + has_more: bool + """Whether there are more items available""" + + has_prev: bool + """Whether there are previous items available""" + + total: Optional[int] = None + """Total number of items available""" + + +class FileListResponse(BaseModel): + pagination: Pagination + """Response model for cursor-based pagination.""" + + object: Optional[Literal["list"]] = None + """The object type of the response""" + + data: List[VectorStoreFile] + """The list of vector store files""" diff --git a/tests/api_resources/data_sources/test_connectors.py b/tests/api_resources/data_sources/test_connectors.py index 5520ee52..f32aeafb 100644 --- a/tests/api_resources/data_sources/test_connectors.py +++ b/tests/api_resources/data_sources/test_connectors.py @@ -9,9 +9,9 @@ from mixedbread import Mixedbread, AsyncMixedbread from tests.utils import assert_matches_type -from mixedbread.pagination import SyncLimitOffset, AsyncLimitOffset from mixedbread.types.data_sources import ( DataSourceConnector, + ConnectorListResponse, ConnectorDeleteResponse, ) @@ -188,16 +188,17 @@ def test_method_list(self, client: Mixedbread) -> None: connector = client.data_sources.connectors.list( data_source_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) - assert_matches_type(SyncLimitOffset[DataSourceConnector], connector, path=["response"]) + assert_matches_type(ConnectorListResponse, connector, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Mixedbread) -> None: connector = client.data_sources.connectors.list( data_source_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", limit=1000, - offset=0, + cursor="cursor", + include_total=True, ) - assert_matches_type(SyncLimitOffset[DataSourceConnector], connector, path=["response"]) + assert_matches_type(ConnectorListResponse, connector, path=["response"]) @parametrize def test_raw_response_list(self, client: Mixedbread) -> None: @@ -208,7 +209,7 @@ def test_raw_response_list(self, client: Mixedbread) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" connector = response.parse() - assert_matches_type(SyncLimitOffset[DataSourceConnector], connector, path=["response"]) + assert_matches_type(ConnectorListResponse, connector, path=["response"]) @parametrize def test_streaming_response_list(self, client: Mixedbread) -> None: @@ -219,7 +220,7 @@ def test_streaming_response_list(self, client: Mixedbread) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" connector = response.parse() - assert_matches_type(SyncLimitOffset[DataSourceConnector], connector, path=["response"]) + assert_matches_type(ConnectorListResponse, connector, path=["response"]) assert cast(Any, response.is_closed) is True @@ -451,16 +452,17 @@ async def test_method_list(self, async_client: AsyncMixedbread) -> None: connector = await async_client.data_sources.connectors.list( data_source_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) - assert_matches_type(AsyncLimitOffset[DataSourceConnector], connector, path=["response"]) + assert_matches_type(ConnectorListResponse, connector, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncMixedbread) -> None: connector = await async_client.data_sources.connectors.list( data_source_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", limit=1000, - offset=0, + cursor="cursor", + include_total=True, ) - assert_matches_type(AsyncLimitOffset[DataSourceConnector], connector, path=["response"]) + assert_matches_type(ConnectorListResponse, connector, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncMixedbread) -> None: @@ -471,7 +473,7 @@ async def test_raw_response_list(self, async_client: AsyncMixedbread) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" connector = await response.parse() - assert_matches_type(AsyncLimitOffset[DataSourceConnector], connector, path=["response"]) + assert_matches_type(ConnectorListResponse, connector, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncMixedbread) -> None: @@ -482,7 +484,7 @@ async def test_streaming_response_list(self, async_client: AsyncMixedbread) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" connector = await response.parse() - assert_matches_type(AsyncLimitOffset[DataSourceConnector], connector, path=["response"]) + assert_matches_type(ConnectorListResponse, connector, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/parsing/test_jobs.py b/tests/api_resources/parsing/test_jobs.py index 64e12e9c..7b22a611 100644 --- a/tests/api_resources/parsing/test_jobs.py +++ b/tests/api_resources/parsing/test_jobs.py @@ -9,7 +9,6 @@ from mixedbread import Mixedbread, AsyncMixedbread from tests.utils import assert_matches_type -from mixedbread.pagination import SyncLimitOffset, AsyncLimitOffset from mixedbread.types.parsing import ( ParsingJob, JobListResponse, @@ -105,15 +104,16 @@ def test_path_params_retrieve(self, client: Mixedbread) -> None: @parametrize def test_method_list(self, client: Mixedbread) -> None: job = client.parsing.jobs.list() - assert_matches_type(SyncLimitOffset[JobListResponse], job, path=["response"]) + assert_matches_type(JobListResponse, job, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Mixedbread) -> None: job = client.parsing.jobs.list( limit=1000, - offset=0, + cursor="cursor", + include_total=True, ) - assert_matches_type(SyncLimitOffset[JobListResponse], job, path=["response"]) + assert_matches_type(JobListResponse, job, path=["response"]) @parametrize def test_raw_response_list(self, client: Mixedbread) -> None: @@ -122,7 +122,7 @@ def test_raw_response_list(self, client: Mixedbread) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = response.parse() - assert_matches_type(SyncLimitOffset[JobListResponse], job, path=["response"]) + assert_matches_type(JobListResponse, job, path=["response"]) @parametrize def test_streaming_response_list(self, client: Mixedbread) -> None: @@ -131,7 +131,7 @@ def test_streaming_response_list(self, client: Mixedbread) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = response.parse() - assert_matches_type(SyncLimitOffset[JobListResponse], job, path=["response"]) + assert_matches_type(JobListResponse, job, path=["response"]) assert cast(Any, response.is_closed) is True @@ -300,15 +300,16 @@ async def test_path_params_retrieve(self, async_client: AsyncMixedbread) -> None @parametrize async def test_method_list(self, async_client: AsyncMixedbread) -> None: job = await async_client.parsing.jobs.list() - assert_matches_type(AsyncLimitOffset[JobListResponse], job, path=["response"]) + assert_matches_type(JobListResponse, job, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncMixedbread) -> None: job = await async_client.parsing.jobs.list( limit=1000, - offset=0, + cursor="cursor", + include_total=True, ) - assert_matches_type(AsyncLimitOffset[JobListResponse], job, path=["response"]) + assert_matches_type(JobListResponse, job, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncMixedbread) -> None: @@ -317,7 +318,7 @@ async def test_raw_response_list(self, async_client: AsyncMixedbread) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = await response.parse() - assert_matches_type(AsyncLimitOffset[JobListResponse], job, path=["response"]) + assert_matches_type(JobListResponse, job, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncMixedbread) -> None: @@ -326,7 +327,7 @@ async def test_streaming_response_list(self, async_client: AsyncMixedbread) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = await response.parse() - assert_matches_type(AsyncLimitOffset[JobListResponse], job, path=["response"]) + assert_matches_type(JobListResponse, job, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_data_sources.py b/tests/api_resources/test_data_sources.py index fa43c6ee..94ad5653 100644 --- a/tests/api_resources/test_data_sources.py +++ b/tests/api_resources/test_data_sources.py @@ -11,9 +11,9 @@ from tests.utils import assert_matches_type from mixedbread.types import ( DataSource, + DataSourceListResponse, DataSourceDeleteResponse, ) -from mixedbread.pagination import SyncLimitOffset, AsyncLimitOffset base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -250,15 +250,16 @@ def test_path_params_update_overload_2(self, client: Mixedbread) -> None: @parametrize def test_method_list(self, client: Mixedbread) -> None: data_source = client.data_sources.list() - assert_matches_type(SyncLimitOffset[DataSource], data_source, path=["response"]) + assert_matches_type(DataSourceListResponse, data_source, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Mixedbread) -> None: data_source = client.data_sources.list( limit=1000, - offset=0, + cursor="cursor", + include_total=True, ) - assert_matches_type(SyncLimitOffset[DataSource], data_source, path=["response"]) + assert_matches_type(DataSourceListResponse, data_source, path=["response"]) @parametrize def test_raw_response_list(self, client: Mixedbread) -> None: @@ -267,7 +268,7 @@ def test_raw_response_list(self, client: Mixedbread) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" data_source = response.parse() - assert_matches_type(SyncLimitOffset[DataSource], data_source, path=["response"]) + assert_matches_type(DataSourceListResponse, data_source, path=["response"]) @parametrize def test_streaming_response_list(self, client: Mixedbread) -> None: @@ -276,7 +277,7 @@ def test_streaming_response_list(self, client: Mixedbread) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" data_source = response.parse() - assert_matches_type(SyncLimitOffset[DataSource], data_source, path=["response"]) + assert_matches_type(DataSourceListResponse, data_source, path=["response"]) assert cast(Any, response.is_closed) is True @@ -553,15 +554,16 @@ async def test_path_params_update_overload_2(self, async_client: AsyncMixedbread @parametrize async def test_method_list(self, async_client: AsyncMixedbread) -> None: data_source = await async_client.data_sources.list() - assert_matches_type(AsyncLimitOffset[DataSource], data_source, path=["response"]) + assert_matches_type(DataSourceListResponse, data_source, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncMixedbread) -> None: data_source = await async_client.data_sources.list( limit=1000, - offset=0, + cursor="cursor", + include_total=True, ) - assert_matches_type(AsyncLimitOffset[DataSource], data_source, path=["response"]) + assert_matches_type(DataSourceListResponse, data_source, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncMixedbread) -> None: @@ -570,7 +572,7 @@ async def test_raw_response_list(self, async_client: AsyncMixedbread) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" data_source = await response.parse() - assert_matches_type(AsyncLimitOffset[DataSource], data_source, path=["response"]) + assert_matches_type(DataSourceListResponse, data_source, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncMixedbread) -> None: @@ -579,7 +581,7 @@ async def test_streaming_response_list(self, async_client: AsyncMixedbread) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" data_source = await response.parse() - assert_matches_type(AsyncLimitOffset[DataSource], data_source, path=["response"]) + assert_matches_type(DataSourceListResponse, data_source, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index dd9440c4..9fdc535d 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -11,14 +11,17 @@ from mixedbread import Mixedbread, AsyncMixedbread from tests.utils import assert_matches_type -from mixedbread.types import FileObject, FileDeleteResponse +from mixedbread.types import ( + FileObject, + FileListResponse, + FileDeleteResponse, +) from mixedbread._response import ( BinaryAPIResponse, AsyncBinaryAPIResponse, StreamedBinaryAPIResponse, AsyncStreamedBinaryAPIResponse, ) -from mixedbread.pagination import SyncLimitOffset, AsyncLimitOffset base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -140,15 +143,16 @@ def test_path_params_update(self, client: Mixedbread) -> None: @parametrize def test_method_list(self, client: Mixedbread) -> None: file = client.files.list() - assert_matches_type(SyncLimitOffset[FileObject], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Mixedbread) -> None: file = client.files.list( limit=1000, - offset=0, + cursor="cursor", + include_total=True, ) - assert_matches_type(SyncLimitOffset[FileObject], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) @parametrize def test_raw_response_list(self, client: Mixedbread) -> None: @@ -157,7 +161,7 @@ def test_raw_response_list(self, client: Mixedbread) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = response.parse() - assert_matches_type(SyncLimitOffset[FileObject], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) @parametrize def test_streaming_response_list(self, client: Mixedbread) -> None: @@ -166,7 +170,7 @@ def test_streaming_response_list(self, client: Mixedbread) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = response.parse() - assert_matches_type(SyncLimitOffset[FileObject], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) assert cast(Any, response.is_closed) is True @@ -384,15 +388,16 @@ async def test_path_params_update(self, async_client: AsyncMixedbread) -> None: @parametrize async def test_method_list(self, async_client: AsyncMixedbread) -> None: file = await async_client.files.list() - assert_matches_type(AsyncLimitOffset[FileObject], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncMixedbread) -> None: file = await async_client.files.list( limit=1000, - offset=0, + cursor="cursor", + include_total=True, ) - assert_matches_type(AsyncLimitOffset[FileObject], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncMixedbread) -> None: @@ -401,7 +406,7 @@ async def test_raw_response_list(self, async_client: AsyncMixedbread) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = await response.parse() - assert_matches_type(AsyncLimitOffset[FileObject], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncMixedbread) -> None: @@ -410,7 +415,7 @@ async def test_streaming_response_list(self, async_client: AsyncMixedbread) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = await response.parse() - assert_matches_type(AsyncLimitOffset[FileObject], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_vector_stores.py b/tests/api_resources/test_vector_stores.py index c6872f10..4be0efcc 100644 --- a/tests/api_resources/test_vector_stores.py +++ b/tests/api_resources/test_vector_stores.py @@ -11,11 +11,11 @@ from tests.utils import assert_matches_type from mixedbread.types import ( VectorStore, + VectorStoreListResponse, VectorStoreDeleteResponse, VectorStoreSearchResponse, VectorStoreQuestionAnsweringResponse, ) -from mixedbread.pagination import SyncLimitOffset, AsyncLimitOffset base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -161,16 +161,17 @@ def test_path_params_update(self, client: Mixedbread) -> None: @parametrize def test_method_list(self, client: Mixedbread) -> None: vector_store = client.vector_stores.list() - assert_matches_type(SyncLimitOffset[VectorStore], vector_store, path=["response"]) + assert_matches_type(VectorStoreListResponse, vector_store, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Mixedbread) -> None: vector_store = client.vector_stores.list( limit=1000, - offset=0, + cursor="cursor", + include_total=True, q="x", ) - assert_matches_type(SyncLimitOffset[VectorStore], vector_store, path=["response"]) + assert_matches_type(VectorStoreListResponse, vector_store, path=["response"]) @parametrize def test_raw_response_list(self, client: Mixedbread) -> None: @@ -179,7 +180,7 @@ def test_raw_response_list(self, client: Mixedbread) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" vector_store = response.parse() - assert_matches_type(SyncLimitOffset[VectorStore], vector_store, path=["response"]) + assert_matches_type(VectorStoreListResponse, vector_store, path=["response"]) @parametrize def test_streaming_response_list(self, client: Mixedbread) -> None: @@ -188,7 +189,7 @@ def test_streaming_response_list(self, client: Mixedbread) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" vector_store = response.parse() - assert_matches_type(SyncLimitOffset[VectorStore], vector_store, path=["response"]) + assert_matches_type(VectorStoreListResponse, vector_store, path=["response"]) assert cast(Any, response.is_closed) is True @@ -547,16 +548,17 @@ async def test_path_params_update(self, async_client: AsyncMixedbread) -> None: @parametrize async def test_method_list(self, async_client: AsyncMixedbread) -> None: vector_store = await async_client.vector_stores.list() - assert_matches_type(AsyncLimitOffset[VectorStore], vector_store, path=["response"]) + assert_matches_type(VectorStoreListResponse, vector_store, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncMixedbread) -> None: vector_store = await async_client.vector_stores.list( limit=1000, - offset=0, + cursor="cursor", + include_total=True, q="x", ) - assert_matches_type(AsyncLimitOffset[VectorStore], vector_store, path=["response"]) + assert_matches_type(VectorStoreListResponse, vector_store, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncMixedbread) -> None: @@ -565,7 +567,7 @@ async def test_raw_response_list(self, async_client: AsyncMixedbread) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" vector_store = await response.parse() - assert_matches_type(AsyncLimitOffset[VectorStore], vector_store, path=["response"]) + assert_matches_type(VectorStoreListResponse, vector_store, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncMixedbread) -> None: @@ -574,7 +576,7 @@ async def test_streaming_response_list(self, async_client: AsyncMixedbread) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" vector_store = await response.parse() - assert_matches_type(AsyncLimitOffset[VectorStore], vector_store, path=["response"]) + assert_matches_type(VectorStoreListResponse, vector_store, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/vector_stores/test_files.py b/tests/api_resources/vector_stores/test_files.py index 8a80638e..3d125ccd 100644 --- a/tests/api_resources/vector_stores/test_files.py +++ b/tests/api_resources/vector_stores/test_files.py @@ -9,9 +9,9 @@ from mixedbread import Mixedbread, AsyncMixedbread from tests.utils import assert_matches_type -from mixedbread.pagination import SyncLimitOffset, AsyncLimitOffset from mixedbread.types.vector_stores import ( VectorStoreFile, + FileListResponse, FileDeleteResponse, FileSearchResponse, ) @@ -134,16 +134,18 @@ def test_method_list(self, client: Mixedbread) -> None: file = client.vector_stores.files.list( vector_store_identifier="vector_store_identifier", ) - assert_matches_type(SyncLimitOffset[VectorStoreFile], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Mixedbread) -> None: file = client.vector_stores.files.list( vector_store_identifier="vector_store_identifier", limit=1000, - offset=0, + cursor="cursor", + include_total=True, + statuses=["pending"], ) - assert_matches_type(SyncLimitOffset[VectorStoreFile], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) @parametrize def test_raw_response_list(self, client: Mixedbread) -> None: @@ -154,7 +156,7 @@ def test_raw_response_list(self, client: Mixedbread) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = response.parse() - assert_matches_type(SyncLimitOffset[VectorStoreFile], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) @parametrize def test_streaming_response_list(self, client: Mixedbread) -> None: @@ -165,7 +167,7 @@ def test_streaming_response_list(self, client: Mixedbread) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = response.parse() - assert_matches_type(SyncLimitOffset[VectorStoreFile], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) assert cast(Any, response.is_closed) is True @@ -434,16 +436,18 @@ async def test_method_list(self, async_client: AsyncMixedbread) -> None: file = await async_client.vector_stores.files.list( vector_store_identifier="vector_store_identifier", ) - assert_matches_type(AsyncLimitOffset[VectorStoreFile], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncMixedbread) -> None: file = await async_client.vector_stores.files.list( vector_store_identifier="vector_store_identifier", limit=1000, - offset=0, + cursor="cursor", + include_total=True, + statuses=["pending"], ) - assert_matches_type(AsyncLimitOffset[VectorStoreFile], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncMixedbread) -> None: @@ -454,7 +458,7 @@ async def test_raw_response_list(self, async_client: AsyncMixedbread) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = await response.parse() - assert_matches_type(AsyncLimitOffset[VectorStoreFile], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncMixedbread) -> None: @@ -465,7 +469,7 @@ async def test_streaming_response_list(self, async_client: AsyncMixedbread) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = await response.parse() - assert_matches_type(AsyncLimitOffset[VectorStoreFile], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) assert cast(Any, response.is_closed) is True From d5cdb5f6e73302df90ecf65e4f8ce34d8c08159d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 13:04:24 +0000 Subject: [PATCH 2/3] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index aea82ac0..5cdcb68a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 49 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-fd1562786a889e981d7d9b30d7f4b29d3d2ea11a8c30e19b919fae07ea355ccd.yml -openapi_spec_hash: bed820af5a3ec78f236f707f63293d47 +openapi_spec_hash: 1d83645e7d7bc1b6ccfc1ecc7cca656a config_hash: ca0dfb431a44ea42464c42b224addf36 From a9325762153918c02236cc9a0332726e5d83e69d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 13:04:41 +0000 Subject: [PATCH 3/3] release: 0.10.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/mixedbread/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6d78745c..091cfb12 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.9.0" + ".": "0.10.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 25f8d152..ac2c9fb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.10.0 (2025-06-25) + +Full Changelog: [v0.9.0...v0.10.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.9.0...v0.10.0) + +### Features + +* **api:** update via SDK Studio ([b24bf23](https://github.com/mixedbread-ai/mixedbread-python/commit/b24bf2302314795ab0e7748eac1720d73c5fe958)) + ## 0.9.0 (2025-06-25) Full Changelog: [v0.8.1...v0.9.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.8.1...v0.9.0) diff --git a/pyproject.toml b/pyproject.toml index 15422725..d4a54e06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mixedbread" -version = "0.9.0" +version = "0.10.0" description = "The official Python library for the Mixedbread API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/mixedbread/_version.py b/src/mixedbread/_version.py index 9205ddcd..10f2a576 100644 --- a/src/mixedbread/_version.py +++ b/src/mixedbread/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "mixedbread" -__version__ = "0.9.0" # x-release-please-version +__version__ = "0.10.0" # x-release-please-version