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.4.0"
".": "0.5.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: 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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
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 = "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"
Expand Down
2 changes: 1 addition & 1 deletion src/replicate/_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__ = "replicate"
__version__ = "0.4.0" # x-release-please-version
__version__ = "0.5.0" # x-release-please-version
16 changes: 8 additions & 8 deletions src/replicate/resources/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,18 @@ 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
```

The response will be a model object in the following format:

```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,
Expand Down Expand Up @@ -520,18 +520,18 @@ 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
```

The response will be a model object in the following format:

```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,
Expand Down
60 changes: 30 additions & 30 deletions tests/api_resources/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -33,25 +33,25 @@ 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

@pytest.mark.skip()
@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",
)

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -262,25 +262,25 @@ 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

@pytest.mark.skip()
@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",
)

Expand All @@ -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
Expand Down