Skip to content

Commit d36589e

Browse files
feat(api): api update
1 parent fdb39b0 commit d36589e

File tree

5 files changed

+5
-12
lines changed

5 files changed

+5
-12
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 35
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/replicate%2Freplicate-client-88cf5fe1f5accb56ae9fbb31c0df00d1552762d4c558d16d8547894ae95e8ccb.yml
3-
openapi_spec_hash: 43283d20f335a04241cce165452ff50e
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/replicate%2Freplicate-client-8f6c27fe1521273cd9d08f1250da89c9b60b7bd231fa07f9e18ccba353488930.yml
3+
openapi_spec_hash: 12e010a9fe6bed4b9c00e95a85f28b91
44
config_hash: 8e356248f15e5e54d2aecab141f45228

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ client = Replicate()
152152

153153
client.files.create(
154154
content=Path("/path/to/file"),
155-
filename="filename",
156155
)
157156
```
158157

src/replicate/resources/files.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def create(
5858
self,
5959
*,
6060
content: FileTypes,
61-
filename: str,
61+
filename: str | NotGiven = NOT_GIVEN,
6262
metadata: object | NotGiven = NOT_GIVEN,
6363
type: str | NotGiven = NOT_GIVEN,
6464
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -336,7 +336,7 @@ async def create(
336336
self,
337337
*,
338338
content: FileTypes,
339-
filename: str,
339+
filename: str | NotGiven = NOT_GIVEN,
340340
metadata: object | NotGiven = NOT_GIVEN,
341341
type: str | NotGiven = NOT_GIVEN,
342342
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.

src/replicate/types/file_create_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class FileCreateParams(TypedDict, total=False):
1313
content: Required[FileTypes]
1414
"""The file content"""
1515

16-
filename: Required[str]
16+
filename: str
1717
"""The filename"""
1818

1919
metadata: object

tests/api_resources/test_files.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class TestFiles:
3535
def test_method_create(self, client: Replicate) -> None:
3636
file = client.files.create(
3737
content=b"raw file contents",
38-
filename="filename",
3938
)
4039
assert_matches_type(FileCreateResponse, file, path=["response"])
4140

@@ -55,7 +54,6 @@ def test_method_create_with_all_params(self, client: Replicate) -> None:
5554
def test_raw_response_create(self, client: Replicate) -> None:
5655
response = client.files.with_raw_response.create(
5756
content=b"raw file contents",
58-
filename="filename",
5957
)
6058

6159
assert response.is_closed is True
@@ -68,7 +66,6 @@ def test_raw_response_create(self, client: Replicate) -> None:
6866
def test_streaming_response_create(self, client: Replicate) -> None:
6967
with client.files.with_streaming_response.create(
7068
content=b"raw file contents",
71-
filename="filename",
7269
) as response:
7370
assert not response.is_closed
7471
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -265,7 +262,6 @@ class TestAsyncFiles:
265262
async def test_method_create(self, async_client: AsyncReplicate) -> None:
266263
file = await async_client.files.create(
267264
content=b"raw file contents",
268-
filename="filename",
269265
)
270266
assert_matches_type(FileCreateResponse, file, path=["response"])
271267

@@ -285,7 +281,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncReplicate)
285281
async def test_raw_response_create(self, async_client: AsyncReplicate) -> None:
286282
response = await async_client.files.with_raw_response.create(
287283
content=b"raw file contents",
288-
filename="filename",
289284
)
290285

291286
assert response.is_closed is True
@@ -298,7 +293,6 @@ async def test_raw_response_create(self, async_client: AsyncReplicate) -> None:
298293
async def test_streaming_response_create(self, async_client: AsyncReplicate) -> None:
299294
async with async_client.files.with_streaming_response.create(
300295
content=b"raw file contents",
301-
filename="filename",
302296
) as response:
303297
assert not response.is_closed
304298
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

0 commit comments

Comments
 (0)