Skip to content

Commit 8ada0ea

Browse files
feat(api): api update
1 parent 22e5269 commit 8ada0ea

4 files changed

Lines changed: 22 additions & 6 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 48
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-6b06bb4445b89267baa75d56ef71b875f980c2cb38e1884a74f699feaee6a7ce.yml
3-
openapi_spec_hash: 75094130ee0b736a9b3e928df7c942d2
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-a331b701867ba3d3dd907c8389fde663be4fda24c91e23f54f4dde8a6ade683f.yml
3+
openapi_spec_hash: 95587d9746abb97d5b294bfedf86b782
44
config_hash: 8545159b6ba2d638b8a2e7bbed6f04e7

src/mixedbread/resources/vector_stores/vector_stores.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ def list(
237237
*,
238238
limit: int | NotGiven = NOT_GIVEN,
239239
offset: int | NotGiven = NOT_GIVEN,
240+
q: Optional[str] | NotGiven = NOT_GIVEN,
240241
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
241242
# The extra values given here take precedence over values defined on the client or passed to this method.
242243
extra_headers: Headers | None = None,
@@ -245,9 +246,10 @@ def list(
245246
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
246247
) -> SyncLimitOffset[VectorStore]:
247248
"""
248-
List all vector stores.
249+
List all vector stores with optional search.
249250
250-
Args: pagination: The pagination options.
251+
Args: pagination: The pagination options. q: Optional search query to filter
252+
vector stores.
251253
252254
Returns: VectorStoreListResponse: The list of vector stores.
253255
@@ -256,6 +258,8 @@ def list(
256258
257259
offset: Offset of the first item to return
258260
261+
q: Search query for fuzzy matching over name and description fields
262+
259263
extra_headers: Send extra headers
260264
261265
extra_query: Add additional query parameters to the request
@@ -276,6 +280,7 @@ def list(
276280
{
277281
"limit": limit,
278282
"offset": offset,
283+
"q": q,
279284
},
280285
vector_store_list_params.VectorStoreListParams,
281286
),
@@ -667,6 +672,7 @@ def list(
667672
*,
668673
limit: int | NotGiven = NOT_GIVEN,
669674
offset: int | NotGiven = NOT_GIVEN,
675+
q: Optional[str] | NotGiven = NOT_GIVEN,
670676
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
671677
# The extra values given here take precedence over values defined on the client or passed to this method.
672678
extra_headers: Headers | None = None,
@@ -675,9 +681,10 @@ def list(
675681
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
676682
) -> AsyncPaginator[VectorStore, AsyncLimitOffset[VectorStore]]:
677683
"""
678-
List all vector stores.
684+
List all vector stores with optional search.
679685
680-
Args: pagination: The pagination options.
686+
Args: pagination: The pagination options. q: Optional search query to filter
687+
vector stores.
681688
682689
Returns: VectorStoreListResponse: The list of vector stores.
683690
@@ -686,6 +693,8 @@ def list(
686693
687694
offset: Offset of the first item to return
688695
696+
q: Search query for fuzzy matching over name and description fields
697+
689698
extra_headers: Send extra headers
690699
691700
extra_query: Add additional query parameters to the request
@@ -706,6 +715,7 @@ def list(
706715
{
707716
"limit": limit,
708717
"offset": offset,
718+
"q": q,
709719
},
710720
vector_store_list_params.VectorStoreListParams,
711721
),

src/mixedbread/types/vector_store_list_params.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
56
from typing_extensions import TypedDict
67

78
__all__ = ["VectorStoreListParams"]
@@ -13,3 +14,6 @@ class VectorStoreListParams(TypedDict, total=False):
1314

1415
offset: int
1516
"""Offset of the first item to return"""
17+
18+
q: Optional[str]
19+
"""Search query for fuzzy matching over name and description fields"""

tests/api_resources/test_vector_stores.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ def test_method_list_with_all_params(self, client: Mixedbread) -> None:
166166
vector_store = client.vector_stores.list(
167167
limit=1000,
168168
offset=0,
169+
q="x",
169170
)
170171
assert_matches_type(SyncLimitOffset[VectorStore], vector_store, path=["response"])
171172

@@ -547,6 +548,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncMixedbread)
547548
vector_store = await async_client.vector_stores.list(
548549
limit=1000,
549550
offset=0,
551+
q="x",
550552
)
551553
assert_matches_type(AsyncLimitOffset[VectorStore], vector_store, path=["response"])
552554

0 commit comments

Comments
 (0)