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.1.0-alpha.34"
".": "0.1.0-alpha.35"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 32
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-e49fa63938c7d1a40e291d7b3f486a09b88afbbecb89bb42e4f06438a1ea9f21.yml
openapi_spec_hash: 09cf222f034cb196974b7c7c131cc860
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-82c2c1c322149cd73b2e8e45f475919b941752a89e74464ccecd1aee9352e9be.yml
openapi_spec_hash: bfb0b19d1094dc80774c752f9b84185e
config_hash: 52e7472faf7b81b5fda98bd67bd7d0d9
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.1.0-alpha.35 (2025-03-29)

Full Changelog: [v0.1.0-alpha.34...v0.1.0-alpha.35](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.1.0-alpha.34...v0.1.0-alpha.35)

### Features

* **api:** update via SDK Studio ([#160](https://github.com/mixedbread-ai/mixedbread-python/issues/160)) ([6446f27](https://github.com/mixedbread-ai/mixedbread-python/commit/6446f276404b983c716d946737d9cc40ed5751ae))

## 0.1.0-alpha.34 (2025-03-28)

Full Changelog: [v0.1.0-alpha.33...v0.1.0-alpha.34](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.1.0-alpha.33...v0.1.0-alpha.34)
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.1.0-alpha.34"
version = "0.1.0-alpha.35"
description = "The official Python library for the Mixedbread API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
10 changes: 6 additions & 4 deletions src/mixedbread/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def embed(
self,
*,
model: str,
input: client_embed_params.Input,
input: List[str],
dimensions: Optional[int] | NotGiven = NOT_GIVEN,
prompt: Optional[str] | NotGiven = NOT_GIVEN,
normalized: bool | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -277,7 +277,8 @@ def embed(

normalized: Whether to normalize the embeddings.

encoding_format: The encoding format of the embeddings.
encoding_format: The encoding format(s) of the embeddings. Can be a single format or a list of
formats.

extra_headers: Send extra headers

Expand Down Expand Up @@ -598,7 +599,7 @@ async def embed(
self,
*,
model: str,
input: client_embed_params.Input,
input: List[str],
dimensions: Optional[int] | NotGiven = NOT_GIVEN,
prompt: Optional[str] | NotGiven = NOT_GIVEN,
normalized: bool | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -633,7 +634,8 @@ async def embed(

normalized: Whether to normalize the embeddings.

encoding_format: The encoding format of the embeddings.
encoding_format: The encoding format(s) of the embeddings. Can be a single format or a list of
formats.

extra_headers: Send extra headers

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.1.0-alpha.34" # x-release-please-version
__version__ = "0.1.0-alpha.35" # x-release-please-version
10 changes: 6 additions & 4 deletions src/mixedbread/resources/embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def create(
self,
*,
model: str,
input: embedding_create_params.Input,
input: List[str],
dimensions: Optional[int] | NotGiven = NOT_GIVEN,
prompt: Optional[str] | NotGiven = NOT_GIVEN,
normalized: bool | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -86,7 +86,8 @@ def create(

normalized: Whether to normalize the embeddings.

encoding_format: The encoding format of the embeddings.
encoding_format: The encoding format(s) of the embeddings. Can be a single format or a list of
formats.

extra_headers: Send extra headers

Expand Down Expand Up @@ -140,7 +141,7 @@ async def create(
self,
*,
model: str,
input: embedding_create_params.Input,
input: List[str],
dimensions: Optional[int] | NotGiven = NOT_GIVEN,
prompt: Optional[str] | NotGiven = NOT_GIVEN,
normalized: bool | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -175,7 +176,8 @@ async def create(

normalized: Whether to normalize the embeddings.

encoding_format: The encoding format of the embeddings.
encoding_format: The encoding format(s) of the embeddings. Can be a single format or a list of
formats.

extra_headers: Send extra headers

Expand Down
6 changes: 4 additions & 2 deletions src/mixedbread/resources/extractions/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from __future__ import annotations

from typing import Dict

import httpx

from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
Expand Down Expand Up @@ -48,7 +50,7 @@ def create(
self,
*,
content: str,
json_schema: object,
json_schema: Dict[str, object],
# 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 @@ -116,7 +118,7 @@ async def create(
self,
*,
content: str,
json_schema: object,
json_schema: Dict[str, object],
# 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
6 changes: 4 additions & 2 deletions src/mixedbread/resources/extractions/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from __future__ import annotations

from typing import Dict

import httpx

from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
Expand Down Expand Up @@ -48,7 +50,7 @@ def create(
self,
*,
file_id: str,
json_schema: object,
json_schema: Dict[str, object],
# 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 @@ -155,7 +157,7 @@ async def create(
self,
*,
file_id: str,
json_schema: object,
json_schema: Dict[str, object],
# 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
10 changes: 6 additions & 4 deletions src/mixedbread/resources/extractions/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from __future__ import annotations

from typing import Dict

import httpx

from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
Expand Down Expand Up @@ -87,7 +89,7 @@ def create(
def enhance(
self,
*,
json_schema: object,
json_schema: Dict[str, object],
# 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 @@ -125,7 +127,7 @@ def enhance(
def validate(
self,
*,
json_schema: object,
json_schema: Dict[str, object],
# 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 @@ -222,7 +224,7 @@ async def create(
async def enhance(
self,
*,
json_schema: object,
json_schema: Dict[str, object],
# 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 @@ -260,7 +262,7 @@ async def enhance(
async def validate(
self,
*,
json_schema: object,
json_schema: Dict[str, object],
# 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
33 changes: 6 additions & 27 deletions src/mixedbread/types/client_embed_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
from __future__ import annotations

from typing import List, Union, Optional
from typing_extensions import Literal, Required, TypeAlias, TypedDict
from typing_extensions import Literal, Required, TypedDict

__all__ = ["ClientEmbedParams", "Input", "InputImageURLInput", "InputImageURLInputImage", "InputTextInput"]
__all__ = ["ClientEmbedParams"]


class ClientEmbedParams(TypedDict, total=False):
model: Required[str]
"""The model to use for creating embeddings."""

input: Required[Input]
input: Required[List[str]]
"""The input to create embeddings for."""

dimensions: Optional[int]
Expand All @@ -28,28 +28,7 @@ class ClientEmbedParams(TypedDict, total=False):
Literal["float", "float16", "base64", "binary", "ubinary", "int8", "uint8"],
List[Literal["float", "float16", "base64", "binary", "ubinary", "int8", "uint8"]],
]
"""The encoding format of the embeddings."""
"""The encoding format(s) of the embeddings.


class InputImageURLInputImage(TypedDict, total=False):
url: Required[str]
"""The image URL. Can be either a URL or a Data URI."""


class InputImageURLInput(TypedDict, total=False):
type: Literal["image_url"]
"""Input type identifier"""

image: Required[InputImageURLInputImage]
"""The image input specification."""


class InputTextInput(TypedDict, total=False):
type: Literal["text"]
"""Input type identifier"""

text: Required[str]
"""Text content to process"""


Input: TypeAlias = Union[str, InputImageURLInput, InputTextInput]
Can be a single format or a list of formats.
"""
4 changes: 2 additions & 2 deletions src/mixedbread/types/embedding.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Union
from typing import List, Union, Optional
from typing_extensions import Literal

from .._models import BaseModel
Expand All @@ -15,5 +15,5 @@ class Embedding(BaseModel):
index: int
"""The index of the embedding."""

object: Literal["embedding"]
object: Optional[Literal["embedding"]] = None
"""The object type of the embedding."""
33 changes: 6 additions & 27 deletions src/mixedbread/types/embedding_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
from __future__ import annotations

from typing import List, Union, Optional
from typing_extensions import Literal, Required, TypeAlias, TypedDict
from typing_extensions import Literal, Required, TypedDict

__all__ = ["EmbeddingCreateParams", "Input", "InputImageURLInput", "InputImageURLInputImage", "InputTextInput"]
__all__ = ["EmbeddingCreateParams"]


class EmbeddingCreateParams(TypedDict, total=False):
model: Required[str]
"""The model to use for creating embeddings."""

input: Required[Input]
input: Required[List[str]]
"""The input to create embeddings for."""

dimensions: Optional[int]
Expand All @@ -28,28 +28,7 @@ class EmbeddingCreateParams(TypedDict, total=False):
Literal["float", "float16", "base64", "binary", "ubinary", "int8", "uint8"],
List[Literal["float", "float16", "base64", "binary", "ubinary", "int8", "uint8"]],
]
"""The encoding format of the embeddings."""
"""The encoding format(s) of the embeddings.


class InputImageURLInputImage(TypedDict, total=False):
url: Required[str]
"""The image URL. Can be either a URL or a Data URI."""


class InputImageURLInput(TypedDict, total=False):
type: Literal["image_url"]
"""Input type identifier"""

image: Required[InputImageURLInputImage]
"""The image input specification."""


class InputTextInput(TypedDict, total=False):
type: Literal["text"]
"""Input type identifier"""

text: Required[str]
"""Text content to process"""


Input: TypeAlias = Union[str, InputImageURLInput, InputTextInput]
Can be a single format or a list of formats.
"""
8 changes: 4 additions & 4 deletions src/mixedbread/types/embedding_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class DataUnionMember1Embedding(BaseModel):

ubinary: Optional[List[int]] = None

base64: Optional[List[str]] = None
base64: Optional[str] = None


class DataUnionMember1(BaseModel):
Expand All @@ -45,7 +45,7 @@ class DataUnionMember1(BaseModel):
index: int
"""The index of the embedding."""

object: Literal["embedding_dict"]
object: Optional[Literal["embedding_dict"]] = None
"""The object type of the embedding."""


Expand All @@ -66,7 +66,7 @@ class EmbeddingCreateResponse(BaseModel):
"job",
"embedding",
"embedding_dict",
"text_document",
"rank_result",
"file",
"vector_store",
"vector_store.file",
Expand All @@ -82,7 +82,7 @@ class EmbeddingCreateResponse(BaseModel):
Literal["float", "float16", "base64", "binary", "ubinary", "int8", "uint8"],
List[Literal["float", "float16", "base64", "binary", "ubinary", "int8", "uint8"]],
]
"""The encoding format of the embeddings."""
"""The encoding formats of the embeddings."""

dimensions: Optional[int] = None
"""The number of dimensions used for the embeddings."""
3 changes: 2 additions & 1 deletion src/mixedbread/types/extractions/content_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

from typing import Dict
from typing_extensions import Required, TypedDict

__all__ = ["ContentCreateParams"]
Expand All @@ -11,5 +12,5 @@ class ContentCreateParams(TypedDict, total=False):
content: Required[str]
"""The content to extract from"""

json_schema: Required[object]
json_schema: Required[Dict[str, object]]
"""The JSON schema to use for extraction"""
3 changes: 2 additions & 1 deletion src/mixedbread/types/extractions/created_json_schema.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Dict

from ..._models import BaseModel

__all__ = ["CreatedJsonSchema"]


class CreatedJsonSchema(BaseModel):
json_schema: object
json_schema: Dict[str, object]
"""The created JSON schema"""
Loading
Loading