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.22.0"
".": "0.22.1"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 49
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-7f00f72937a82d3184ef21bc91c848984d4c3bacf910a671ac2c5736025d862c.yml
openapi_spec_hash: 5c59e45eebcbb99551e308b194ec6243
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-4983c57f5143aaeadfbb4af35595570e613035ae500ff1597fdf600cc2a48959.yml
openapi_spec_hash: ecc0a6cfe61c3c959d034d094f36befe
config_hash: 810d9712d3d0d6a1f50d71a25511d8a7
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 0.22.1 (2025-08-09)

Full Changelog: [v0.22.0...v0.22.1](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.22.0...v0.22.1)

### Features

* **api:** api update ([71c3ae0](https://github.com/mixedbread-ai/mixedbread-python/commit/71c3ae0def3c67a777c2dfaa7c1fc30c52d694ce))


### Chores

* **internal:** update comment in script ([03dc4dd](https://github.com/mixedbread-ai/mixedbread-python/commit/03dc4dd1fdc9d385c18cc20ba2f2274345b46721))
* update @stainless-api/prism-cli to v5.15.0 ([bbb836a](https://github.com/mixedbread-ai/mixedbread-python/commit/bbb836accc961bb5316bb2ecfc5ac0983773c398))

## 0.22.0 (2025-08-06)

Full Changelog: [v0.21.0...v0.22.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.21.0...v0.22.0)
Expand Down
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Shared Types

```python
from mixedbread.types import SearchFilterCondition, Usage
from mixedbread.types import SearchFilter, SearchFilterCondition, Usage
```

# Mixedbread
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 = "mixedbread"
version = "0.22.0"
version = "0.22.1"
description = "The official Python library for the Mixedbread API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions scripts/mock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}"

# Run prism mock on the given spec
if [ "$1" == "--daemon" ]; then
npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" &> .prism.log &
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &

# Wait for server to come online
echo -n "Waiting for server"
Expand All @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then

echo
else
npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL"
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL"
fi
2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ elif ! prism_is_running ; then
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the prism command:"
echo
echo -e " \$ ${YELLOW}npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock path/to/your.openapi.yml${NC}"
echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
echo

exit 1
Expand Down
2 changes: 1 addition & 1 deletion src/mixedbread/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "mixedbread"
__version__ = "0.22.0" # x-release-please-version
__version__ = "0.22.1" # x-release-please-version
8 changes: 0 additions & 8 deletions src/mixedbread/resources/vector_stores/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ def list(
before: Optional[str] | NotGiven = NOT_GIVEN,
include_total: bool | NotGiven = NOT_GIVEN,
statuses: Optional[List[VectorStoreFileStatus]] | NotGiven = NOT_GIVEN,
metadata_filter: Optional[file_list_params.MetadataFilter] | 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,
Expand Down Expand Up @@ -202,8 +201,6 @@ def list(

statuses: Status to filter by

metadata_filter: Metadata filter to apply to the query

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -231,7 +228,6 @@ def list(
"before": before,
"include_total": include_total,
"statuses": statuses,
"metadata_filter": metadata_filter,
},
file_list_params.FileListParams,
),
Expand Down Expand Up @@ -613,7 +609,6 @@ def list(
before: Optional[str] | NotGiven = NOT_GIVEN,
include_total: bool | NotGiven = NOT_GIVEN,
statuses: Optional[List[VectorStoreFileStatus]] | NotGiven = NOT_GIVEN,
metadata_filter: Optional[file_list_params.MetadataFilter] | 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,
Expand Down Expand Up @@ -644,8 +639,6 @@ def list(

statuses: Status to filter by

metadata_filter: Metadata filter to apply to the query

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -673,7 +666,6 @@ def list(
"before": before,
"include_total": include_total,
"statuses": statuses,
"metadata_filter": metadata_filter,
},
file_list_params.FileListParams,
),
Expand Down
13 changes: 12 additions & 1 deletion src/mixedbread/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

from __future__ import annotations

from .shared import Usage as Usage, SearchFilterCondition as SearchFilterCondition
from . import shared
from .. import _compat
from .shared import Usage as Usage, SearchFilter as SearchFilter, SearchFilterCondition as SearchFilterCondition
from .api_key import APIKey as APIKey
from .embedding import Embedding as Embedding
from .data_source import DataSource as DataSource
Expand Down Expand Up @@ -56,3 +58,12 @@
from .vector_store_question_answering_response import (
VectorStoreQuestionAnsweringResponse as VectorStoreQuestionAnsweringResponse,
)

# Rebuild cyclical models only after all modules are imported.
# This ensures that, when building the deferred (due to cyclical references) model schema,
# Pydantic can resolve the necessary references.
# See: https://github.com/pydantic/pydantic/issues/11250 for more context.
if _compat.PYDANTIC_V2:
shared.search_filter.SearchFilter.model_rebuild(_parent_namespace_depth=0)
else:
shared.search_filter.SearchFilter.update_forward_refs() # type: ignore
1 change: 1 addition & 0 deletions src/mixedbread/types/shared/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .usage import Usage as Usage
from .search_filter import SearchFilter as SearchFilter
from .search_filter_condition import SearchFilterCondition as SearchFilterCondition
38 changes: 38 additions & 0 deletions src/mixedbread/types/shared/search_filter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing import TYPE_CHECKING, List, Union, Optional
from typing_extensions import TypeAlias, TypeAliasType

from ..._compat import PYDANTIC_V2
from ..._models import BaseModel
from .search_filter_condition import SearchFilterCondition

__all__ = ["SearchFilter", "All", "Any", "NoneType"]

if TYPE_CHECKING or PYDANTIC_V2:
All = TypeAliasType("All", Union["SearchFilter", SearchFilterCondition])
else:
All: TypeAlias = Union["SearchFilter", SearchFilterCondition]

if TYPE_CHECKING or PYDANTIC_V2:
Any = TypeAliasType("Any", Union["SearchFilter", SearchFilterCondition])
else:
Any: TypeAlias = Union["SearchFilter", SearchFilterCondition]

if TYPE_CHECKING or PYDANTIC_V2:
NoneType = TypeAliasType("NoneType", Union["SearchFilter", SearchFilterCondition])
else:
NoneType: TypeAlias = Union["SearchFilter", SearchFilterCondition]


class SearchFilter(BaseModel):
all: Optional[List[All]] = None
"""List of conditions or filters to be ANDed together"""

any: Optional[List[Any]] = None
"""List of conditions or filters to be ORed together"""

none: Optional[List[NoneType]] = None
"""List of conditions or filters to be NOTed"""
1 change: 1 addition & 0 deletions src/mixedbread/types/shared_params/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .search_filter import SearchFilter as SearchFilter
from .search_filter_condition import SearchFilterCondition as SearchFilterCondition
37 changes: 37 additions & 0 deletions src/mixedbread/types/shared_params/search_filter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing import TYPE_CHECKING, Union, Iterable, Optional
from typing_extensions import TypeAlias, TypedDict, TypeAliasType

from ..._compat import PYDANTIC_V2
from .search_filter_condition import SearchFilterCondition

__all__ = ["SearchFilter", "All", "Any", "NoneType"]

if TYPE_CHECKING or PYDANTIC_V2:
All = TypeAliasType("All", Union["SearchFilter", SearchFilterCondition])
else:
All: TypeAlias = Union["SearchFilter", SearchFilterCondition]

if TYPE_CHECKING or PYDANTIC_V2:
Any = TypeAliasType("Any", Union["SearchFilter", SearchFilterCondition])
else:
Any: TypeAlias = Union["SearchFilter", SearchFilterCondition]

if TYPE_CHECKING or PYDANTIC_V2:
NoneType = TypeAliasType("NoneType", Union["SearchFilter", SearchFilterCondition])
else:
NoneType: TypeAlias = Union["SearchFilter", SearchFilterCondition]


class SearchFilter(TypedDict, total=False):
all: Optional[Iterable[All]]
"""List of conditions or filters to be ANDed together"""

any: Optional[Iterable[Any]]
"""List of conditions or filters to be ORed together"""

none: Optional[Iterable[NoneType]]
"""List of conditions or filters to be NOTed"""
62 changes: 6 additions & 56 deletions src/mixedbread/types/vector_store_question_answering_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,7 @@
from .shared_params.search_filter_condition import SearchFilterCondition
from .vector_store_chunk_search_options_param import VectorStoreChunkSearchOptionsParam

__all__ = [
"VectorStoreQuestionAnsweringParams",
"Filters",
"FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1",
"FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1All",
"FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1Any",
"FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1None",
"FiltersUnionMember2",
"FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1",
"FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1All",
"FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1Any",
"FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1None",
"QaOptions",
]
__all__ = ["VectorStoreQuestionAnsweringParams", "Filters", "FiltersUnionMember2", "QaOptions"]


class VectorStoreQuestionAnsweringParams(TypedDict, total=False):
Expand Down Expand Up @@ -55,49 +42,9 @@ class VectorStoreQuestionAnsweringParams(TypedDict, total=False):
"""Question answering configuration options"""


FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1All: TypeAlias = Union[SearchFilterCondition, object]
FiltersUnionMember2: TypeAlias = Union["SearchFilter", SearchFilterCondition]

FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1Any: TypeAlias = Union[SearchFilterCondition, object]

FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1None: TypeAlias = Union[SearchFilterCondition, object]


class FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1(TypedDict, total=False):
all: Optional[Iterable[FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1All]]
"""List of conditions or filters to be ANDed together"""

any: Optional[Iterable[FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1Any]]
"""List of conditions or filters to be ORed together"""

none: Optional[Iterable[FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1None]]
"""List of conditions or filters to be NOTed"""


FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1All: TypeAlias = Union[SearchFilterCondition, object]

FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1Any: TypeAlias = Union[SearchFilterCondition, object]

FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1None: TypeAlias = Union[SearchFilterCondition, object]


class FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1(TypedDict, total=False):
all: Optional[Iterable[FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1All]]
"""List of conditions or filters to be ANDed together"""

any: Optional[Iterable[FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1Any]]
"""List of conditions or filters to be ORed together"""

none: Optional[Iterable[FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1None]]
"""List of conditions or filters to be NOTed"""


FiltersUnionMember2: TypeAlias = Union[
FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1, SearchFilterCondition
]

Filters: TypeAlias = Union[
FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1, SearchFilterCondition, Iterable[FiltersUnionMember2]
]
Filters: TypeAlias = Union["SearchFilter", SearchFilterCondition, Iterable[FiltersUnionMember2]]


class QaOptions(TypedDict, total=False):
Expand All @@ -106,3 +53,6 @@ class QaOptions(TypedDict, total=False):

multimodal: bool
"""Whether to use multimodal context"""


from .shared_params.search_filter import SearchFilter
58 changes: 4 additions & 54 deletions src/mixedbread/types/vector_store_search_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,7 @@
from .shared_params.search_filter_condition import SearchFilterCondition
from .vector_store_chunk_search_options_param import VectorStoreChunkSearchOptionsParam

__all__ = [
"VectorStoreSearchParams",
"Filters",
"FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1",
"FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1All",
"FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1Any",
"FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1None",
"FiltersUnionMember2",
"FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1",
"FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1All",
"FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1Any",
"FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1None",
]
__all__ = ["VectorStoreSearchParams", "Filters", "FiltersUnionMember2"]


class VectorStoreSearchParams(TypedDict, total=False):
Expand All @@ -45,46 +33,8 @@ class VectorStoreSearchParams(TypedDict, total=False):
"""Search configuration options"""


FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1All: TypeAlias = Union[SearchFilterCondition, object]
FiltersUnionMember2: TypeAlias = Union["SearchFilter", SearchFilterCondition]

FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1Any: TypeAlias = Union[SearchFilterCondition, object]
Filters: TypeAlias = Union["SearchFilter", SearchFilterCondition, Iterable[FiltersUnionMember2]]

FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1None: TypeAlias = Union[SearchFilterCondition, object]


class FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1(TypedDict, total=False):
all: Optional[Iterable[FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1All]]
"""List of conditions or filters to be ANDed together"""

any: Optional[Iterable[FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1Any]]
"""List of conditions or filters to be ORed together"""

none: Optional[Iterable[FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1None]]
"""List of conditions or filters to be NOTed"""


FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1All: TypeAlias = Union[SearchFilterCondition, object]

FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1Any: TypeAlias = Union[SearchFilterCondition, object]

FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1None: TypeAlias = Union[SearchFilterCondition, object]


class FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1(TypedDict, total=False):
all: Optional[Iterable[FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1All]]
"""List of conditions or filters to be ANDed together"""

any: Optional[Iterable[FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1Any]]
"""List of conditions or filters to be ORed together"""

none: Optional[Iterable[FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1None]]
"""List of conditions or filters to be NOTed"""


FiltersUnionMember2: TypeAlias = Union[
FiltersUnionMember2MxbaiOmniCoreVectorStoreModelsSearchFilter1, SearchFilterCondition
]

Filters: TypeAlias = Union[
FiltersMxbaiOmniCoreVectorStoreModelsSearchFilter1, SearchFilterCondition, Iterable[FiltersUnionMember2]
]
from .shared_params.search_filter import SearchFilter
Loading