diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 154a6970..0c41cec4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.37" + ".": "0.1.0-alpha.38" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 0f169186..dfdb2a8c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 32 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/mixedbread%2Fmixedbread-82c2c1c322149cd73b2e8e45f475919b941752a89e74464ccecd1aee9352e9be.yml -openapi_spec_hash: bfb0b19d1094dc80774c752f9b84185e -config_hash: 69ea986b716f75e2cd90b43881a59c88 +openapi_spec_hash: dbd7616a32c90fd25b32994830fb12f6 +config_hash: d4b3b47ba72c8829d6b804dd74b079c2 diff --git a/CHANGELOG.md b/CHANGELOG.md index e77fa2e9..fc424f40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.0-alpha.38 (2025-04-03) + +Full Changelog: [v0.1.0-alpha.37...v0.1.0-alpha.38](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.1.0-alpha.37...v0.1.0-alpha.38) + +### Features + +* **api:** update via SDK Studio ([#169](https://github.com/mixedbread-ai/mixedbread-python/issues/169)) ([0989c35](https://github.com/mixedbread-ai/mixedbread-python/commit/0989c35d0b41f0e63ccb449bf80afdc9b28c47c4)) + ## 0.1.0-alpha.37 (2025-04-03) Full Changelog: [v0.1.0-alpha.36...v0.1.0-alpha.37](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.1.0-alpha.36...v0.1.0-alpha.37) diff --git a/api.md b/api.md index 60da71e9..c88b1319 100644 --- a/api.md +++ b/api.md @@ -9,62 +9,15 @@ from mixedbread.types import SearchFilter, SearchFilterCondition Types: ```python -from mixedbread.types import InfoResponse, RerankResponse +from mixedbread.types import EmbedResponse, InfoResponse, RerankResponse ``` Methods: -- client.embed(\*\*params) -> EmbeddingCreateResponse +- client.embed(\*\*params) -> EmbedResponse - client.info() -> InfoResponse - client.rerank(\*\*params) -> RerankResponse -# Embeddings - -Types: - -```python -from mixedbread.types import Embedding, EmbeddingCreateResponse -``` - -Methods: - -- client.embeddings.create(\*\*params) -> EmbeddingCreateResponse - -# Parsing - -## Jobs - -Types: - -```python -from mixedbread.types.parsing import ParsingJob, JobListResponse, JobDeleteResponse -``` - -Methods: - -- client.parsing.jobs.create(\*\*params) -> ParsingJob -- client.parsing.jobs.retrieve(job_id) -> ParsingJob -- client.parsing.jobs.list(\*\*params) -> SyncLimitOffset[JobListResponse] -- client.parsing.jobs.delete(job_id) -> JobDeleteResponse -- client.parsing.jobs.cancel(job_id) -> ParsingJob - -# Files - -Types: - -```python -from mixedbread.types import FileObject, FileDeleteResponse -``` - -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.delete(file_id) -> FileDeleteResponse -- client.files.content(file_id) -> BinaryAPIResponse - # VectorStores Types: @@ -114,6 +67,41 @@ Methods: - client.vector_stores.files.delete(file_id, \*, vector_store_id) -> FileDeleteResponse - client.vector_stores.files.search(\*\*params) -> FileSearchResponse +# Parsing + +## Jobs + +Types: + +```python +from mixedbread.types.parsing import ParsingJob, JobListResponse, JobDeleteResponse +``` + +Methods: + +- client.parsing.jobs.create(\*\*params) -> ParsingJob +- client.parsing.jobs.retrieve(job_id) -> ParsingJob +- client.parsing.jobs.list(\*\*params) -> SyncLimitOffset[JobListResponse] +- client.parsing.jobs.delete(job_id) -> JobDeleteResponse +- client.parsing.jobs.cancel(job_id) -> ParsingJob + +# Files + +Types: + +```python +from mixedbread.types import FileObject, FileDeleteResponse +``` + +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.delete(file_id) -> FileDeleteResponse +- client.files.content(file_id) -> BinaryAPIResponse + # Extractions ## Jobs @@ -154,3 +142,15 @@ from mixedbread.types.extractions import ExtractionResult Methods: - client.extractions.content.create(\*\*params) -> ExtractionResult + +# Embeddings + +Types: + +```python +from mixedbread.types import EmbeddingCreateResponse +``` + +Methods: + +- client.embeddings.create(\*\*params) -> EmbeddingCreateResponse diff --git a/pyproject.toml b/pyproject.toml index 2385f4e6..4a2c8f3d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mixedbread" -version = "0.1.0-alpha.37" +version = "0.1.0-alpha.38" description = "The official Python library for the Mixedbread API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/mixedbread/_client.py b/src/mixedbread/_client.py index 506a0e3b..b9996076 100644 --- a/src/mixedbread/_client.py +++ b/src/mixedbread/_client.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import Any, Dict, List, Union, Mapping, Optional, cast +from typing import Any, Dict, List, Union, Mapping, Iterable, Optional, cast from typing_extensions import Self, Literal, override import httpx @@ -47,10 +47,10 @@ ) from .resources.parsing import parsing from .types.info_response import InfoResponse +from .types.embed_response import EmbedResponse from .resources.extractions import extractions from .types.rerank_response import RerankResponse from .resources.vector_stores import vector_stores -from .types.embedding_create_response import EmbeddingCreateResponse __all__ = [ "ENVIRONMENTS", @@ -71,11 +71,11 @@ class Mixedbread(SyncAPIClient): - embeddings: embeddings.EmbeddingsResource + vector_stores: vector_stores.VectorStoresResource parsing: parsing.ParsingResource files: files.FilesResource - vector_stores: vector_stores.VectorStoresResource extractions: extractions.ExtractionsResource + embeddings: embeddings.EmbeddingsResource with_raw_response: MixedbreadWithRawResponse with_streaming_response: MixedbreadWithStreamedResponse @@ -157,11 +157,11 @@ def __init__( _strict_response_validation=_strict_response_validation, ) - self.embeddings = embeddings.EmbeddingsResource(self) + self.vector_stores = vector_stores.VectorStoresResource(self) self.parsing = parsing.ParsingResource(self) self.files = files.FilesResource(self) - self.vector_stores = vector_stores.VectorStoresResource(self) self.extractions = extractions.ExtractionsResource(self) + self.embeddings = embeddings.EmbeddingsResource(self) self.with_raw_response = MixedbreadWithRawResponse(self) self.with_streaming_response = MixedbreadWithStreamedResponse(self) @@ -257,7 +257,7 @@ def embed( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EmbeddingCreateResponse: + ) -> EmbedResponse: """ Create embeddings for text or images using the specified model, encoding format, and normalization. @@ -304,7 +304,7 @@ def embed( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=EmbeddingCreateResponse, + cast_to=EmbedResponse, ) def info( @@ -335,7 +335,7 @@ def rerank( *, model: str | NotGiven = NOT_GIVEN, query: str, - input: List[Union[str, object]], + input: List[Union[str, Iterable[object], object]], rank_fields: Optional[List[str]] | NotGiven = NOT_GIVEN, top_k: int | NotGiven = NOT_GIVEN, return_input: bool | NotGiven = NOT_GIVEN, @@ -349,9 +349,9 @@ def rerank( """ Rerank different kind of documents for a given query. - Args: params: RerankingCreateParams: The parameters for reranking. + Args: params: RerankParams: The parameters for reranking. - Returns: RerankingCreateResponse: The reranked documents for the input query. + Returns: RerankResponse: The reranked documents for the input query. Args: model: The model to use for reranking documents. @@ -428,11 +428,11 @@ def _make_status_error( class AsyncMixedbread(AsyncAPIClient): - embeddings: embeddings.AsyncEmbeddingsResource + vector_stores: vector_stores.AsyncVectorStoresResource parsing: parsing.AsyncParsingResource files: files.AsyncFilesResource - vector_stores: vector_stores.AsyncVectorStoresResource extractions: extractions.AsyncExtractionsResource + embeddings: embeddings.AsyncEmbeddingsResource with_raw_response: AsyncMixedbreadWithRawResponse with_streaming_response: AsyncMixedbreadWithStreamedResponse @@ -514,11 +514,11 @@ def __init__( _strict_response_validation=_strict_response_validation, ) - self.embeddings = embeddings.AsyncEmbeddingsResource(self) + self.vector_stores = vector_stores.AsyncVectorStoresResource(self) self.parsing = parsing.AsyncParsingResource(self) self.files = files.AsyncFilesResource(self) - self.vector_stores = vector_stores.AsyncVectorStoresResource(self) self.extractions = extractions.AsyncExtractionsResource(self) + self.embeddings = embeddings.AsyncEmbeddingsResource(self) self.with_raw_response = AsyncMixedbreadWithRawResponse(self) self.with_streaming_response = AsyncMixedbreadWithStreamedResponse(self) @@ -614,7 +614,7 @@ async def embed( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> EmbeddingCreateResponse: + ) -> EmbedResponse: """ Create embeddings for text or images using the specified model, encoding format, and normalization. @@ -661,7 +661,7 @@ async def embed( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=EmbeddingCreateResponse, + cast_to=EmbedResponse, ) async def info( @@ -692,7 +692,7 @@ async def rerank( *, model: str | NotGiven = NOT_GIVEN, query: str, - input: List[Union[str, object]], + input: List[Union[str, Iterable[object], object]], rank_fields: Optional[List[str]] | NotGiven = NOT_GIVEN, top_k: int | NotGiven = NOT_GIVEN, return_input: bool | NotGiven = NOT_GIVEN, @@ -706,9 +706,9 @@ async def rerank( """ Rerank different kind of documents for a given query. - Args: params: RerankingCreateParams: The parameters for reranking. + Args: params: RerankParams: The parameters for reranking. - Returns: RerankingCreateResponse: The reranked documents for the input query. + Returns: RerankResponse: The reranked documents for the input query. Args: model: The model to use for reranking documents. @@ -786,11 +786,11 @@ def _make_status_error( class MixedbreadWithRawResponse: def __init__(self, client: Mixedbread) -> None: - self.embeddings = embeddings.EmbeddingsResourceWithRawResponse(client.embeddings) + self.vector_stores = vector_stores.VectorStoresResourceWithRawResponse(client.vector_stores) self.parsing = parsing.ParsingResourceWithRawResponse(client.parsing) self.files = files.FilesResourceWithRawResponse(client.files) - self.vector_stores = vector_stores.VectorStoresResourceWithRawResponse(client.vector_stores) self.extractions = extractions.ExtractionsResourceWithRawResponse(client.extractions) + self.embeddings = embeddings.EmbeddingsResourceWithRawResponse(client.embeddings) self.embed = to_raw_response_wrapper( client.embed, @@ -805,11 +805,11 @@ def __init__(self, client: Mixedbread) -> None: class AsyncMixedbreadWithRawResponse: def __init__(self, client: AsyncMixedbread) -> None: - self.embeddings = embeddings.AsyncEmbeddingsResourceWithRawResponse(client.embeddings) + self.vector_stores = vector_stores.AsyncVectorStoresResourceWithRawResponse(client.vector_stores) self.parsing = parsing.AsyncParsingResourceWithRawResponse(client.parsing) self.files = files.AsyncFilesResourceWithRawResponse(client.files) - self.vector_stores = vector_stores.AsyncVectorStoresResourceWithRawResponse(client.vector_stores) self.extractions = extractions.AsyncExtractionsResourceWithRawResponse(client.extractions) + self.embeddings = embeddings.AsyncEmbeddingsResourceWithRawResponse(client.embeddings) self.embed = async_to_raw_response_wrapper( client.embed, @@ -824,11 +824,11 @@ def __init__(self, client: AsyncMixedbread) -> None: class MixedbreadWithStreamedResponse: def __init__(self, client: Mixedbread) -> None: - self.embeddings = embeddings.EmbeddingsResourceWithStreamingResponse(client.embeddings) + self.vector_stores = vector_stores.VectorStoresResourceWithStreamingResponse(client.vector_stores) self.parsing = parsing.ParsingResourceWithStreamingResponse(client.parsing) self.files = files.FilesResourceWithStreamingResponse(client.files) - self.vector_stores = vector_stores.VectorStoresResourceWithStreamingResponse(client.vector_stores) self.extractions = extractions.ExtractionsResourceWithStreamingResponse(client.extractions) + self.embeddings = embeddings.EmbeddingsResourceWithStreamingResponse(client.embeddings) self.embed = to_streamed_response_wrapper( client.embed, @@ -843,11 +843,11 @@ def __init__(self, client: Mixedbread) -> None: class AsyncMixedbreadWithStreamedResponse: def __init__(self, client: AsyncMixedbread) -> None: - self.embeddings = embeddings.AsyncEmbeddingsResourceWithStreamingResponse(client.embeddings) + self.vector_stores = vector_stores.AsyncVectorStoresResourceWithStreamingResponse(client.vector_stores) self.parsing = parsing.AsyncParsingResourceWithStreamingResponse(client.parsing) self.files = files.AsyncFilesResourceWithStreamingResponse(client.files) - self.vector_stores = vector_stores.AsyncVectorStoresResourceWithStreamingResponse(client.vector_stores) self.extractions = extractions.AsyncExtractionsResourceWithStreamingResponse(client.extractions) + self.embeddings = embeddings.AsyncEmbeddingsResourceWithStreamingResponse(client.embeddings) self.embed = async_to_streamed_response_wrapper( client.embed, diff --git a/src/mixedbread/_version.py b/src/mixedbread/_version.py index b1995b29..5a6196cd 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.1.0-alpha.37" # x-release-please-version +__version__ = "0.1.0-alpha.38" # x-release-please-version diff --git a/src/mixedbread/resources/__init__.py b/src/mixedbread/resources/__init__.py index e98cf7b8..7df49504 100644 --- a/src/mixedbread/resources/__init__.py +++ b/src/mixedbread/resources/__init__.py @@ -42,12 +42,12 @@ ) __all__ = [ - "EmbeddingsResource", - "AsyncEmbeddingsResource", - "EmbeddingsResourceWithRawResponse", - "AsyncEmbeddingsResourceWithRawResponse", - "EmbeddingsResourceWithStreamingResponse", - "AsyncEmbeddingsResourceWithStreamingResponse", + "VectorStoresResource", + "AsyncVectorStoresResource", + "VectorStoresResourceWithRawResponse", + "AsyncVectorStoresResourceWithRawResponse", + "VectorStoresResourceWithStreamingResponse", + "AsyncVectorStoresResourceWithStreamingResponse", "ParsingResource", "AsyncParsingResource", "ParsingResourceWithRawResponse", @@ -60,16 +60,16 @@ "AsyncFilesResourceWithRawResponse", "FilesResourceWithStreamingResponse", "AsyncFilesResourceWithStreamingResponse", - "VectorStoresResource", - "AsyncVectorStoresResource", - "VectorStoresResourceWithRawResponse", - "AsyncVectorStoresResourceWithRawResponse", - "VectorStoresResourceWithStreamingResponse", - "AsyncVectorStoresResourceWithStreamingResponse", "ExtractionsResource", "AsyncExtractionsResource", "ExtractionsResourceWithRawResponse", "AsyncExtractionsResourceWithRawResponse", "ExtractionsResourceWithStreamingResponse", "AsyncExtractionsResourceWithStreamingResponse", + "EmbeddingsResource", + "AsyncEmbeddingsResource", + "EmbeddingsResourceWithRawResponse", + "AsyncEmbeddingsResourceWithRawResponse", + "EmbeddingsResourceWithStreamingResponse", + "AsyncEmbeddingsResourceWithStreamingResponse", ] diff --git a/src/mixedbread/types/__init__.py b/src/mixedbread/types/__init__.py index 18991940..cdda6dd8 100644 --- a/src/mixedbread/types/__init__.py +++ b/src/mixedbread/types/__init__.py @@ -3,12 +3,12 @@ from __future__ import annotations from .shared import SearchFilter as SearchFilter, SearchFilterCondition as SearchFilterCondition -from .embedding import Embedding as Embedding from .file_counts import FileCounts as FileCounts from .file_object import FileObject as FileObject from .vector_store import VectorStore as VectorStore from .expires_after import ExpiresAfter as ExpiresAfter from .info_response import InfoResponse as InfoResponse +from .embed_response import EmbedResponse as EmbedResponse from .rerank_response import RerankResponse as RerankResponse from .file_list_params import FileListParams as FileListParams from .file_create_params import FileCreateParams as FileCreateParams diff --git a/src/mixedbread/types/client_rerank_params.py b/src/mixedbread/types/client_rerank_params.py index 85b40928..ee17f942 100644 --- a/src/mixedbread/types/client_rerank_params.py +++ b/src/mixedbread/types/client_rerank_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Union, Optional +from typing import List, Union, Iterable, Optional from typing_extensions import Required, TypedDict __all__ = ["ClientRerankParams"] @@ -15,7 +15,7 @@ class ClientRerankParams(TypedDict, total=False): query: Required[str] """The query to rerank the documents.""" - input: Required[List[Union[str, object]]] + input: Required[List[Union[str, Iterable[object], object]]] """The input documents to rerank.""" rank_fields: Optional[List[str]] diff --git a/src/mixedbread/types/embed_response.py b/src/mixedbread/types/embed_response.py new file mode 100644 index 00000000..75183ce0 --- /dev/null +++ b/src/mixedbread/types/embed_response.py @@ -0,0 +1,98 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import builtins +from typing import List, Union, Optional +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["EmbedResponse", "Usage", "DataUnionMember0", "DataUnionMember1", "DataUnionMember1Embedding"] + + +class Usage(BaseModel): + prompt_tokens: int + """The number of tokens used for the prompt""" + + total_tokens: int + """The total number of tokens used""" + + completion_tokens: Optional[int] = None + """The number of tokens used for the completion""" + + +class DataUnionMember0(BaseModel): + embedding: Union[List[float], List[int], str] + """The encoded embedding.""" + + index: int + """The index of the embedding.""" + + object: Optional[Literal["embedding"]] = None + """The object type of the embedding.""" + + +class DataUnionMember1Embedding(BaseModel): + float: Optional[List[builtins.float]] = None + + int8: Optional[List[int]] = None + + uint8: Optional[List[int]] = None + + binary: Optional[List[int]] = None + + ubinary: Optional[List[int]] = None + + base64: Optional[str] = None + + +class DataUnionMember1(BaseModel): + embedding: DataUnionMember1Embedding + """ + The encoded embedding data by encoding format.Returned, if more than one + encoding format is used. + """ + + index: int + """The index of the embedding.""" + + object: Optional[Literal["embedding_dict"]] = None + """The object type of the embedding.""" + + +class EmbedResponse(BaseModel): + usage: Usage + """The usage of the model""" + + model: str + """The model used""" + + data: Union[List[DataUnionMember0], List[DataUnionMember1]] + """The created embeddings.""" + + object: Optional[ + Literal[ + "list", + "parsing_job", + "job", + "embedding", + "embedding_dict", + "rank_result", + "file", + "vector_store", + "vector_store.file", + "api_key", + ] + ] = None + """The object type of the response""" + + normalized: bool + """Whether the embeddings are normalized.""" + + encoding_format: Union[ + Literal["float", "float16", "base64", "binary", "ubinary", "int8", "uint8"], + List[Literal["float", "float16", "base64", "binary", "ubinary", "int8", "uint8"]], + ] + """The encoding formats of the embeddings.""" + + dimensions: Optional[int] = None + """The number of dimensions used for the embeddings.""" diff --git a/src/mixedbread/types/embedding.py b/src/mixedbread/types/embedding.py deleted file mode 100644 index 19fd8136..00000000 --- a/src/mixedbread/types/embedding.py +++ /dev/null @@ -1,19 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Union, Optional -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["Embedding"] - - -class Embedding(BaseModel): - embedding: Union[List[float], List[int], str] - """The encoded embedding.""" - - index: int - """The index of the embedding.""" - - object: Optional[Literal["embedding"]] = None - """The object type of the embedding.""" diff --git a/src/mixedbread/types/embedding_create_response.py b/src/mixedbread/types/embedding_create_response.py index c72e68cb..e95bf75a 100644 --- a/src/mixedbread/types/embedding_create_response.py +++ b/src/mixedbread/types/embedding_create_response.py @@ -5,9 +5,8 @@ from typing_extensions import Literal from .._models import BaseModel -from .embedding import Embedding -__all__ = ["EmbeddingCreateResponse", "Usage", "DataUnionMember1", "DataUnionMember1Embedding"] +__all__ = ["EmbeddingCreateResponse", "Usage", "DataUnionMember0", "DataUnionMember1", "DataUnionMember1Embedding"] class Usage(BaseModel): @@ -21,6 +20,17 @@ class Usage(BaseModel): """The number of tokens used for the completion""" +class DataUnionMember0(BaseModel): + embedding: Union[List[float], List[int], str] + """The encoded embedding.""" + + index: int + """The index of the embedding.""" + + object: Optional[Literal["embedding"]] = None + """The object type of the embedding.""" + + class DataUnionMember1Embedding(BaseModel): float: Optional[List[builtins.float]] = None @@ -56,7 +66,7 @@ class EmbeddingCreateResponse(BaseModel): model: str """The model used""" - data: Union[List[Embedding], List[DataUnionMember1]] + data: Union[List[DataUnionMember0], List[DataUnionMember1]] """The created embeddings.""" object: Optional[ diff --git a/tests/api_resources/test_client.py b/tests/api_resources/test_client.py index 1c38d8ba..1d143378 100644 --- a/tests/api_resources/test_client.py +++ b/tests/api_resources/test_client.py @@ -9,11 +9,7 @@ from mixedbread import Mixedbread, AsyncMixedbread from tests.utils import assert_matches_type -from mixedbread.types import ( - InfoResponse, - RerankResponse, - EmbeddingCreateResponse, -) +from mixedbread.types import InfoResponse, EmbedResponse, RerankResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +23,7 @@ def test_method_embed(self, client: Mixedbread) -> None: model="mixedbread-ai/mxbai-embed-large-v1", input=["string"], ) - assert_matches_type(EmbeddingCreateResponse, client_, path=["response"]) + assert_matches_type(EmbedResponse, client_, path=["response"]) @parametrize def test_method_embed_with_all_params(self, client: Mixedbread) -> None: @@ -39,7 +35,7 @@ def test_method_embed_with_all_params(self, client: Mixedbread) -> None: normalized=True, encoding_format="float", ) - assert_matches_type(EmbeddingCreateResponse, client_, path=["response"]) + assert_matches_type(EmbedResponse, client_, path=["response"]) @parametrize def test_raw_response_embed(self, client: Mixedbread) -> None: @@ -51,7 +47,7 @@ def test_raw_response_embed(self, client: Mixedbread) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_ = response.parse() - assert_matches_type(EmbeddingCreateResponse, client_, path=["response"]) + assert_matches_type(EmbedResponse, client_, path=["response"]) @parametrize def test_streaming_response_embed(self, client: Mixedbread) -> None: @@ -63,7 +59,7 @@ def test_streaming_response_embed(self, client: Mixedbread) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_ = response.parse() - assert_matches_type(EmbeddingCreateResponse, client_, path=["response"]) + assert_matches_type(EmbedResponse, client_, path=["response"]) assert cast(Any, response.is_closed) is True @@ -148,7 +144,7 @@ async def test_method_embed(self, async_client: AsyncMixedbread) -> None: model="mixedbread-ai/mxbai-embed-large-v1", input=["string"], ) - assert_matches_type(EmbeddingCreateResponse, client, path=["response"]) + assert_matches_type(EmbedResponse, client, path=["response"]) @parametrize async def test_method_embed_with_all_params(self, async_client: AsyncMixedbread) -> None: @@ -160,7 +156,7 @@ async def test_method_embed_with_all_params(self, async_client: AsyncMixedbread) normalized=True, encoding_format="float", ) - assert_matches_type(EmbeddingCreateResponse, client, path=["response"]) + assert_matches_type(EmbedResponse, client, path=["response"]) @parametrize async def test_raw_response_embed(self, async_client: AsyncMixedbread) -> None: @@ -172,7 +168,7 @@ async def test_raw_response_embed(self, async_client: AsyncMixedbread) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" client = await response.parse() - assert_matches_type(EmbeddingCreateResponse, client, path=["response"]) + assert_matches_type(EmbedResponse, client, path=["response"]) @parametrize async def test_streaming_response_embed(self, async_client: AsyncMixedbread) -> None: @@ -184,7 +180,7 @@ async def test_streaming_response_embed(self, async_client: AsyncMixedbread) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" client = await response.parse() - assert_matches_type(EmbeddingCreateResponse, client, path=["response"]) + assert_matches_type(EmbedResponse, client, path=["response"]) assert cast(Any, response.is_closed) is True