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.33.0"
".": "0.34.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 61
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-3bdc7b5f293ea927a961e6480cd3efb406c4e1a5ca21a4066f84b0d0e24b141c.yml
openapi_spec_hash: 44d5194554a7f6b454b38c96ac6736fb
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-a14d1b895964291692e90504f3db6d263a4a8d9cca6f1137548ceae0fdc5d82e.yml
openapi_spec_hash: 0608955c434731be0e392470f511e026
config_hash: 2de40c343cf7b242d5925e3405ee8908
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.34.0 (2025-10-08)

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

### Features

* **api:** api update ([429a568](https://github.com/mixedbread-ai/mixedbread-python/commit/429a5686f151bdf0d7927818512cb5ae118575b6))

## 0.33.0 (2025-10-08)

Full Changelog: [v0.32.1...v0.33.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.32.1...v0.33.0)
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.33.0"
version = "0.34.0"
description = "The official Python library for the Mixedbread API"
dynamic = ["readme"]
license = "Apache-2.0"
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.33.0" # x-release-please-version
__version__ = "0.34.0" # x-release-please-version
20 changes: 14 additions & 6 deletions src/mixedbread/resources/stores/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ def create(
store_identifier: str,
*,
metadata: object | Omit = omit,
experimental: file_create_params.Experimental | Omit = omit,
config: file_create_params.Config | Omit = omit,
file_id: str,
experimental: Optional[file_create_params.Experimental] | Omit = omit,
# 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 All @@ -77,10 +78,12 @@ def create(

metadata: Optional metadata for the file

experimental: Strategy for adding the file
config: Configuration for adding the file

file_id: ID of the file to add

experimental: Configuration for a file.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -96,8 +99,9 @@ def create(
body=maybe_transform(
{
"metadata": metadata,
"experimental": experimental,
"config": config,
"file_id": file_id,
"experimental": experimental,
},
file_create_params.FileCreateParams,
),
Expand Down Expand Up @@ -474,8 +478,9 @@ async def create(
store_identifier: str,
*,
metadata: object | Omit = omit,
experimental: file_create_params.Experimental | Omit = omit,
config: file_create_params.Config | Omit = omit,
file_id: str,
experimental: Optional[file_create_params.Experimental] | Omit = omit,
# 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 All @@ -497,10 +502,12 @@ async def create(

metadata: Optional metadata for the file

experimental: Strategy for adding the file
config: Configuration for adding the file

file_id: ID of the file to add

experimental: Configuration for a file.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -516,8 +523,9 @@ async def create(
body=await async_maybe_transform(
{
"metadata": metadata,
"experimental": experimental,
"config": config,
"file_id": file_id,
"experimental": experimental,
},
file_create_params.FileCreateParams,
),
Expand Down
20 changes: 14 additions & 6 deletions src/mixedbread/resources/vector_stores/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ def create(
vector_store_identifier: str,
*,
metadata: object | Omit = omit,
experimental: file_create_params.Experimental | Omit = omit,
config: file_create_params.Config | Omit = omit,
file_id: str,
experimental: Optional[file_create_params.Experimental] | Omit = omit,
# 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 All @@ -73,10 +74,12 @@ def create(

metadata: Optional metadata for the file

experimental: Strategy for adding the file
config: Configuration for adding the file

file_id: ID of the file to add

experimental: Configuration for a file.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -94,8 +97,9 @@ def create(
body=maybe_transform(
{
"metadata": metadata,
"experimental": experimental,
"config": config,
"file_id": file_id,
"experimental": experimental,
},
file_create_params.FileCreateParams,
),
Expand Down Expand Up @@ -460,8 +464,9 @@ async def create(
vector_store_identifier: str,
*,
metadata: object | Omit = omit,
experimental: file_create_params.Experimental | Omit = omit,
config: file_create_params.Config | Omit = omit,
file_id: str,
experimental: Optional[file_create_params.Experimental] | Omit = omit,
# 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 All @@ -477,10 +482,12 @@ async def create(

metadata: Optional metadata for the file

experimental: Strategy for adding the file
config: Configuration for adding the file

file_id: ID of the file to add

experimental: Configuration for a file.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -498,8 +505,9 @@ async def create(
body=await async_maybe_transform(
{
"metadata": metadata,
"experimental": experimental,
"config": config,
"file_id": file_id,
"experimental": experimental,
},
file_create_params.FileCreateParams,
),
Expand Down
18 changes: 15 additions & 3 deletions src/mixedbread/types/stores/file_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,33 @@

from __future__ import annotations

from typing import Optional
from typing_extensions import Literal, Required, TypedDict

__all__ = ["FileCreateParams", "Experimental"]
__all__ = ["FileCreateParams", "Config", "Experimental"]


class FileCreateParams(TypedDict, total=False):
metadata: object
"""Optional metadata for the file"""

experimental: Experimental
"""Strategy for adding the file"""
config: Config
"""Configuration for adding the file"""

file_id: Required[str]
"""ID of the file to add"""

experimental: Optional[Experimental]
"""Configuration for a file."""


class Config(TypedDict, total=False):
parsing_strategy: Literal["fast", "high_quality"]
"""Strategy for adding the file"""

contextualization: bool
"""Whether to contextualize the file"""


class Experimental(TypedDict, total=False):
parsing_strategy: Literal["fast", "high_quality"]
Expand Down
14 changes: 13 additions & 1 deletion src/mixedbread/types/stores/scored_store_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@
from ..scored_image_url_input_chunk import ScoredImageURLInputChunk
from ..scored_video_url_input_chunk import ScoredVideoURLInputChunk

__all__ = ["ScoredStoreFile", "Chunk"]
__all__ = ["ScoredStoreFile", "Config", "Chunk"]


class Config(BaseModel):
parsing_strategy: Optional[Literal["fast", "high_quality"]] = None
"""Strategy for adding the file"""

contextualization: Optional[bool] = None
"""Whether to contextualize the file"""


Chunk: TypeAlias = Annotated[
Union[ScoredTextInputChunk, ScoredImageURLInputChunk, ScoredAudioURLInputChunk, ScoredVideoURLInputChunk],
Expand Down Expand Up @@ -48,6 +57,9 @@ class ScoredStoreFile(BaseModel):
usage_bytes: Optional[int] = None
"""Storage usage in bytes"""

config: Optional[Config] = None
"""Configuration for a file."""

object: Optional[Literal["store.file"]] = None
"""Type of the object"""

Expand Down
12 changes: 12 additions & 0 deletions src/mixedbread/types/stores/store_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

__all__ = [
"StoreFile",
"Config",
"Chunk",
"ChunkTextInputChunk",
"ChunkTextInputChunkGeneratedMetadata",
Expand Down Expand Up @@ -55,6 +56,14 @@
]


class Config(BaseModel):
parsing_strategy: Optional[Literal["fast", "high_quality"]] = None
"""Strategy for adding the file"""

contextualization: Optional[bool] = None
"""Whether to contextualize the file"""


class ChunkTextInputChunkGeneratedMetadataMarkdownChunkGeneratedMetadataChunkHeading(BaseModel):
level: int

Expand Down Expand Up @@ -831,6 +840,9 @@ class StoreFile(BaseModel):
usage_bytes: Optional[int] = None
"""Storage usage in bytes"""

config: Optional[Config] = None
"""Configuration for a file."""

object: Optional[Literal["store.file"]] = None
"""Type of the object"""

Expand Down
18 changes: 15 additions & 3 deletions src/mixedbread/types/vector_stores/file_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,33 @@

from __future__ import annotations

from typing import Optional
from typing_extensions import Literal, Required, TypedDict

__all__ = ["FileCreateParams", "Experimental"]
__all__ = ["FileCreateParams", "Config", "Experimental"]


class FileCreateParams(TypedDict, total=False):
metadata: object
"""Optional metadata for the file"""

experimental: Experimental
"""Strategy for adding the file"""
config: Config
"""Configuration for adding the file"""

file_id: Required[str]
"""ID of the file to add"""

experimental: Optional[Experimental]
"""Configuration for a file."""


class Config(TypedDict, total=False):
parsing_strategy: Literal["fast", "high_quality"]
"""Strategy for adding the file"""

contextualization: bool
"""Whether to contextualize the file"""


class Experimental(TypedDict, total=False):
parsing_strategy: Literal["fast", "high_quality"]
Expand Down
12 changes: 10 additions & 2 deletions tests/api_resources/stores/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,15 @@ def test_method_create_with_all_params(self, client: Mixedbread) -> None:
file = client.stores.files.create(
store_identifier="store_identifier",
metadata={},
experimental={
config={
"parsing_strategy": "fast",
"contextualization": True,
},
file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
experimental={
"parsing_strategy": "fast",
"contextualization": True,
},
)
assert_matches_type(StoreFile, file, path=["response"])

Expand Down Expand Up @@ -380,11 +384,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncMixedbread
file = await async_client.stores.files.create(
store_identifier="store_identifier",
metadata={},
experimental={
config={
"parsing_strategy": "fast",
"contextualization": True,
},
file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
experimental={
"parsing_strategy": "fast",
"contextualization": True,
},
)
assert_matches_type(StoreFile, file, path=["response"])

Expand Down
12 changes: 10 additions & 2 deletions tests/api_resources/vector_stores/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ def test_method_create_with_all_params(self, client: Mixedbread) -> None:
file = client.vector_stores.files.create(
vector_store_identifier="vector_store_identifier",
metadata={},
experimental={
config={
"parsing_strategy": "fast",
"contextualization": True,
},
file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
experimental={
"parsing_strategy": "fast",
"contextualization": True,
},
)

assert_matches_type(VectorStoreFile, file, path=["response"])
Expand Down Expand Up @@ -425,11 +429,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncMixedbread
file = await async_client.vector_stores.files.create(
vector_store_identifier="vector_store_identifier",
metadata={},
experimental={
config={
"parsing_strategy": "fast",
"contextualization": True,
},
file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
experimental={
"parsing_strategy": "fast",
"contextualization": True,
},
)

assert_matches_type(VectorStoreFile, file, path=["response"])
Expand Down
Loading