diff --git a/.release-please-manifest.json b/.release-please-manifest.json index da59f99..2aca35a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.4.0" + ".": "0.5.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 5e0af23..552035c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 35 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/replicate%2Freplicate-client-8f6c27fe1521273cd9d08f1250da89c9b60b7bd231fa07f9e18ccba353488930.yml -openapi_spec_hash: 12e010a9fe6bed4b9c00e95a85f28b91 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/replicate%2Freplicate-client-2f8bfb10427a39d0a79c691643d97cb447b0d114b07cdf146965fd60b5063ebf.yml +openapi_spec_hash: 1a11b292ef30bcf52340847c567de1ad config_hash: 8e356248f15e5e54d2aecab141f45228 diff --git a/CHANGELOG.md b/CHANGELOG.md index 68d3341..3b94982 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.5.0 (2025-05-14) + +Full Changelog: [v0.4.0...v0.5.0](https://github.com/replicate/replicate-python-stainless/compare/v0.4.0...v0.5.0) + +### Features + +* **api:** api update ([dbbd264](https://github.com/replicate/replicate-python-stainless/commit/dbbd264826d1d1e566c7489fb4dfbca2bb3a138f)) + ## 0.4.0 (2025-05-13) Full Changelog: [v0.3.2...v0.4.0](https://github.com/replicate/replicate-python-stainless/compare/v0.3.2...v0.4.0) diff --git a/pyproject.toml b/pyproject.toml index d91825d..8ee7d97 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "replicate-stainless" -version = "0.4.0" +version = "0.5.0" description = "The official Python library for the replicate API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/replicate/_version.py b/src/replicate/_version.py index e36db58..645860e 100644 --- a/src/replicate/_version.py +++ b/src/replicate/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "replicate" -__version__ = "0.4.0" # x-release-please-version +__version__ = "0.5.0" # x-release-please-version diff --git a/src/replicate/resources/models/models.py b/src/replicate/resources/models/models.py index eed71b1..3ca0a72 100644 --- a/src/replicate/resources/models/models.py +++ b/src/replicate/resources/models/models.py @@ -120,7 +120,7 @@ def create( curl -s -X POST \\ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \\ -H 'Content-Type: application/json' \\ - -d '{"owner": "alice", "name": "my-model", "description": "An example model", "visibility": "public", "hardware": "cpu"}' \\ + -d '{"owner": "alice", "name": "hot-dog-detector", "description": "Detect hot dogs in images", "visibility": "public", "hardware": "cpu"}' \\ https://api.replicate.com/v1/models ``` @@ -128,10 +128,10 @@ def create( ```json { - "url": "https://replicate.com/alice/my-model", + "url": "https://replicate.com/alice/hot-dog-detector", "owner": "alice", - "name": "my-model", - "description": "An example model", + "name": "hot-dog-detector", + "description": "Detect hot dogs in images", "visibility": "public", "github_url": null, "paper_url": null, @@ -520,7 +520,7 @@ async def create( curl -s -X POST \\ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \\ -H 'Content-Type: application/json' \\ - -d '{"owner": "alice", "name": "my-model", "description": "An example model", "visibility": "public", "hardware": "cpu"}' \\ + -d '{"owner": "alice", "name": "hot-dog-detector", "description": "Detect hot dogs in images", "visibility": "public", "hardware": "cpu"}' \\ https://api.replicate.com/v1/models ``` @@ -528,10 +528,10 @@ async def create( ```json { - "url": "https://replicate.com/alice/my-model", + "url": "https://replicate.com/alice/hot-dog-detector", "owner": "alice", - "name": "my-model", - "description": "An example model", + "name": "hot-dog-detector", + "description": "Detect hot dogs in images", "visibility": "public", "github_url": null, "paper_url": null, diff --git a/tests/api_resources/test_models.py b/tests/api_resources/test_models.py index 6743c9e..2d1ac8f 100644 --- a/tests/api_resources/test_models.py +++ b/tests/api_resources/test_models.py @@ -22,9 +22,9 @@ class TestModels: @parametrize def test_method_create(self, client: Replicate) -> None: model = client.models.create( - hardware="hardware", - name="name", - owner="owner", + hardware="cpu", + name="hot-dog-detector", + owner="alice", visibility="public", ) assert model is None @@ -33,15 +33,15 @@ def test_method_create(self, client: Replicate) -> None: @parametrize def test_method_create_with_all_params(self, client: Replicate) -> None: model = client.models.create( - hardware="hardware", - name="name", - owner="owner", + hardware="cpu", + name="hot-dog-detector", + owner="alice", visibility="public", cover_image_url="cover_image_url", - description="description", - github_url="github_url", + description="Detect hot dogs in images", + github_url="https://github.com/alice/hot-dog-detector", license_url="license_url", - paper_url="paper_url", + paper_url="https://arxiv.org/abs/2504.17639", ) assert model is None @@ -49,9 +49,9 @@ def test_method_create_with_all_params(self, client: Replicate) -> None: @parametrize def test_raw_response_create(self, client: Replicate) -> None: response = client.models.with_raw_response.create( - hardware="hardware", - name="name", - owner="owner", + hardware="cpu", + name="hot-dog-detector", + owner="alice", visibility="public", ) @@ -64,9 +64,9 @@ def test_raw_response_create(self, client: Replicate) -> None: @parametrize def test_streaming_response_create(self, client: Replicate) -> None: with client.models.with_streaming_response.create( - hardware="hardware", - name="name", - owner="owner", + hardware="cpu", + name="hot-dog-detector", + owner="alice", visibility="public", ) as response: assert not response.is_closed @@ -251,9 +251,9 @@ class TestAsyncModels: @parametrize async def test_method_create(self, async_client: AsyncReplicate) -> None: model = await async_client.models.create( - hardware="hardware", - name="name", - owner="owner", + hardware="cpu", + name="hot-dog-detector", + owner="alice", visibility="public", ) assert model is None @@ -262,15 +262,15 @@ async def test_method_create(self, async_client: AsyncReplicate) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncReplicate) -> None: model = await async_client.models.create( - hardware="hardware", - name="name", - owner="owner", + hardware="cpu", + name="hot-dog-detector", + owner="alice", visibility="public", cover_image_url="cover_image_url", - description="description", - github_url="github_url", + description="Detect hot dogs in images", + github_url="https://github.com/alice/hot-dog-detector", license_url="license_url", - paper_url="paper_url", + paper_url="https://arxiv.org/abs/2504.17639", ) assert model is None @@ -278,9 +278,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncReplicate) @parametrize async def test_raw_response_create(self, async_client: AsyncReplicate) -> None: response = await async_client.models.with_raw_response.create( - hardware="hardware", - name="name", - owner="owner", + hardware="cpu", + name="hot-dog-detector", + owner="alice", visibility="public", ) @@ -293,9 +293,9 @@ async def test_raw_response_create(self, async_client: AsyncReplicate) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncReplicate) -> None: async with async_client.models.with_streaming_response.create( - hardware="hardware", - name="name", - owner="owner", + hardware="cpu", + name="hot-dog-detector", + owner="alice", visibility="public", ) as response: assert not response.is_closed