diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f9963500..a696b6a7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.35" + ".": "0.1.0-alpha.36" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index d87685dc..e15c1ab2 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: 52e7472faf7b81b5fda98bd67bd7d0d9 +config_hash: 3fa8ca8b7bc0d9e1997e20d7a2e4d22c diff --git a/CHANGELOG.md b/CHANGELOG.md index f10d92c3..36199bf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.0-alpha.36 (2025-04-03) + +Full Changelog: [v0.1.0-alpha.35...v0.1.0-alpha.36](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.1.0-alpha.35...v0.1.0-alpha.36) + +### Features + +* **api:** update via SDK Studio ([#163](https://github.com/mixedbread-ai/mixedbread-python/issues/163)) ([95bc622](https://github.com/mixedbread-ai/mixedbread-python/commit/95bc622bc51f436e0a333c1745e6edaf1c57bb78)) + ## 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) diff --git a/README.md b/README.md index 2bdd40c4..a822dd97 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ It is generated with [Stainless](https://www.stainless.com/). ## Documentation -The REST API documentation can be found on [mixedbread.ai](https://mixedbread.ai/docs). The full API of this library can be found in [api.md](api.md). +The REST API documentation can be found on [mixedbread.com](https://mixedbread.com/docs). The full API of this library can be found in [api.md](api.md). ## Installation @@ -28,7 +28,7 @@ import os from mixedbread import Mixedbread client = Mixedbread( - api_key=os.environ.get("MXBAI_API_KEY"), # This is the default and can be omitted + api_key=os.environ.get("MIXEDBREAD_API_KEY"), # This is the default and can be omitted # defaults to "production". environment="local", ) @@ -39,7 +39,7 @@ print(vector_store.id) While you can provide an `api_key` keyword argument, we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/) -to add `MXBAI_API_KEY="My API Key"` to your `.env` file +to add `MIXEDBREAD_API_KEY="My API Key"` to your `.env` file so that your API Key is not stored in source control. ## Async usage @@ -52,7 +52,7 @@ import asyncio from mixedbread import AsyncMixedbread client = AsyncMixedbread( - api_key=os.environ.get("MXBAI_API_KEY"), # This is the default and can be omitted + api_key=os.environ.get("MIXEDBREAD_API_KEY"), # This is the default and can be omitted # defaults to "production". environment="local", ) diff --git a/pyproject.toml b/pyproject.toml index 404a177d..8e2fcbc6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mixedbread" -version = "0.1.0-alpha.35" +version = "0.1.0-alpha.36" 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 e2ce4c5f..506a0e3b 100644 --- a/src/mixedbread/_client.py +++ b/src/mixedbread/_client.py @@ -65,7 +65,7 @@ ] ENVIRONMENTS: Dict[str, str] = { - "production": "https://api.mixedbread.ai", + "production": "https://api.mixedbread.com", "local": "http://127.0.0.1:8000", } @@ -110,13 +110,13 @@ def __init__( ) -> None: """Construct a new synchronous Mixedbread client instance. - This automatically infers the `api_key` argument from the `MXBAI_API_KEY` environment variable if it is not provided. + This automatically infers the `api_key` argument from the `MIXEDBREAD_API_KEY` environment variable if it is not provided. """ if api_key is None: - api_key = os.environ.get("MXBAI_API_KEY") + api_key = os.environ.get("MIXEDBREAD_API_KEY") if api_key is None: raise MixedbreadError( - "The api_key client option must be set either by passing api_key to the client or by setting the MXBAI_API_KEY environment variable" + "The api_key client option must be set either by passing api_key to the client or by setting the MIXEDBREAD_API_KEY environment variable" ) self.api_key = api_key @@ -467,13 +467,13 @@ def __init__( ) -> None: """Construct a new async AsyncMixedbread client instance. - This automatically infers the `api_key` argument from the `MXBAI_API_KEY` environment variable if it is not provided. + This automatically infers the `api_key` argument from the `MIXEDBREAD_API_KEY` environment variable if it is not provided. """ if api_key is None: - api_key = os.environ.get("MXBAI_API_KEY") + api_key = os.environ.get("MIXEDBREAD_API_KEY") if api_key is None: raise MixedbreadError( - "The api_key client option must be set either by passing api_key to the client or by setting the MXBAI_API_KEY environment variable" + "The api_key client option must be set either by passing api_key to the client or by setting the MIXEDBREAD_API_KEY environment variable" ) self.api_key = api_key diff --git a/src/mixedbread/_version.py b/src/mixedbread/_version.py index cf408422..61c8875b 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.35" # x-release-please-version +__version__ = "0.1.0-alpha.36" # x-release-please-version diff --git a/tests/test_client.py b/tests/test_client.py index cb1a8039..9a2b23af 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -342,7 +342,7 @@ def test_validate_headers(self) -> None: assert request.headers.get("Authorization") == f"Bearer {api_key}" with pytest.raises(MixedbreadError): - with update_env(**{"MXBAI_API_KEY": Omit()}): + with update_env(**{"MIXEDBREAD_API_KEY": Omit()}): client2 = Mixedbread(base_url=base_url, api_key=None, _strict_response_validation=True) _ = client2 @@ -568,7 +568,7 @@ def test_base_url_env(self) -> None: client = Mixedbread( base_url=None, api_key=api_key, _strict_response_validation=True, environment="production" ) - assert str(client.base_url).startswith("https://api.mixedbread.ai") + assert str(client.base_url).startswith("https://api.mixedbread.com") @pytest.mark.parametrize( "client", @@ -1122,7 +1122,7 @@ def test_validate_headers(self) -> None: assert request.headers.get("Authorization") == f"Bearer {api_key}" with pytest.raises(MixedbreadError): - with update_env(**{"MXBAI_API_KEY": Omit()}): + with update_env(**{"MIXEDBREAD_API_KEY": Omit()}): client2 = AsyncMixedbread(base_url=base_url, api_key=None, _strict_response_validation=True) _ = client2 @@ -1350,7 +1350,7 @@ def test_base_url_env(self) -> None: client = AsyncMixedbread( base_url=None, api_key=api_key, _strict_response_validation=True, environment="production" ) - assert str(client.base_url).startswith("https://api.mixedbread.ai") + assert str(client.base_url).startswith("https://api.mixedbread.com") @pytest.mark.parametrize( "client",