Skip to content

Commit e107db1

Browse files
feat: fix(ai): rename duplicate parameter in the to_markdown subresource
* fix(ai): rename duplicate parameter in the to_markdown subresource
1 parent 0cfcddc commit e107db1

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1822
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ca8fbfa82d19dca400ec61b8c93392de1acd157860e435419f9a5e9ec8c586e0.yml
33
openapi_spec_hash: 77d55c70bc3824ac61bd056e2319ee18
4-
config_hash: 6cb8bbfc632d4c46bd581a31af34e889
4+
config_hash: 107e0f1f8a98b007260b319226b88b3c

api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9876,7 +9876,7 @@ from cloudflare.types.ai import ToMarkdownTransformResponse
98769876

98779877
Methods:
98789878

9879-
- <code title="post /accounts/{account_id}/ai/tomarkdown">client.ai.to_markdown.<a href="./src/cloudflare/resources/ai/to_markdown.py">transform</a>(body, \*, account_id, \*\*<a href="src/cloudflare/types/ai/to_markdown_transform_params.py">params</a>) -> <a href="./src/cloudflare/types/ai/to_markdown_transform_response.py">SyncSinglePage[ToMarkdownTransformResponse]</a></code>
9879+
- <code title="post /accounts/{account_id}/ai/tomarkdown">client.ai.to_markdown.<a href="./src/cloudflare/resources/ai/to_markdown.py">transform</a>(file, \*, account_id, \*\*<a href="src/cloudflare/types/ai/to_markdown_transform_params.py">params</a>) -> <a href="./src/cloudflare/types/ai/to_markdown_transform_response.py">SyncSinglePage[ToMarkdownTransformResponse]</a></code>
98809880

98819881
# SecurityCenter
98829882

src/cloudflare/resources/ai/to_markdown.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def with_streaming_response(self) -> ToMarkdownResourceWithStreamingResponse:
4343

4444
def transform(
4545
self,
46-
body: FileContent,
46+
file: FileContent,
4747
*,
4848
account_id: str,
4949
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -71,7 +71,7 @@ def transform(
7171
return self._get_api_list(
7272
f"/accounts/{account_id}/ai/tomarkdown",
7373
page=SyncSinglePage[ToMarkdownTransformResponse],
74-
body=read_file_content(body),
74+
body=read_file_content(file),
7575
options=make_request_options(
7676
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
7777
),
@@ -102,7 +102,7 @@ def with_streaming_response(self) -> AsyncToMarkdownResourceWithStreamingRespons
102102

103103
def transform(
104104
self,
105-
body: FileContent,
105+
file: FileContent,
106106
*,
107107
account_id: str,
108108
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -130,7 +130,7 @@ def transform(
130130
return self._get_api_list(
131131
f"/accounts/{account_id}/ai/tomarkdown",
132132
page=AsyncSinglePage[ToMarkdownTransformResponse],
133-
body=read_file_content(body),
133+
body=read_file_content(file),
134134
options=make_request_options(
135135
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
136136
),

tests/api_resources/ai/test_to_markdown.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ class TestToMarkdown:
2121
@parametrize
2222
def test_method_transform(self, client: Cloudflare) -> None:
2323
to_markdown = client.ai.to_markdown.transform(
24-
body=b"raw file contents",
24+
file=b"raw file contents",
2525
account_id="023e105f4ecef8ad9ca31a8372d0c353",
2626
)
2727
assert_matches_type(SyncSinglePage[ToMarkdownTransformResponse], to_markdown, path=["response"])
2828

2929
@parametrize
3030
def test_raw_response_transform(self, client: Cloudflare) -> None:
3131
response = client.ai.to_markdown.with_raw_response.transform(
32-
body=b"raw file contents",
32+
file=b"raw file contents",
3333
account_id="023e105f4ecef8ad9ca31a8372d0c353",
3434
)
3535

@@ -41,7 +41,7 @@ def test_raw_response_transform(self, client: Cloudflare) -> None:
4141
@parametrize
4242
def test_streaming_response_transform(self, client: Cloudflare) -> None:
4343
with client.ai.to_markdown.with_streaming_response.transform(
44-
body=b"raw file contents",
44+
file=b"raw file contents",
4545
account_id="023e105f4ecef8ad9ca31a8372d0c353",
4646
) as response:
4747
assert not response.is_closed
@@ -56,7 +56,7 @@ def test_streaming_response_transform(self, client: Cloudflare) -> None:
5656
def test_path_params_transform(self, client: Cloudflare) -> None:
5757
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
5858
client.ai.to_markdown.with_raw_response.transform(
59-
body=b"raw file contents",
59+
file=b"raw file contents",
6060
account_id="",
6161
)
6262

@@ -69,15 +69,15 @@ class TestAsyncToMarkdown:
6969
@parametrize
7070
async def test_method_transform(self, async_client: AsyncCloudflare) -> None:
7171
to_markdown = await async_client.ai.to_markdown.transform(
72-
body=b"raw file contents",
72+
file=b"raw file contents",
7373
account_id="023e105f4ecef8ad9ca31a8372d0c353",
7474
)
7575
assert_matches_type(AsyncSinglePage[ToMarkdownTransformResponse], to_markdown, path=["response"])
7676

7777
@parametrize
7878
async def test_raw_response_transform(self, async_client: AsyncCloudflare) -> None:
7979
response = await async_client.ai.to_markdown.with_raw_response.transform(
80-
body=b"raw file contents",
80+
file=b"raw file contents",
8181
account_id="023e105f4ecef8ad9ca31a8372d0c353",
8282
)
8383

@@ -89,7 +89,7 @@ async def test_raw_response_transform(self, async_client: AsyncCloudflare) -> No
8989
@parametrize
9090
async def test_streaming_response_transform(self, async_client: AsyncCloudflare) -> None:
9191
async with async_client.ai.to_markdown.with_streaming_response.transform(
92-
body=b"raw file contents",
92+
file=b"raw file contents",
9393
account_id="023e105f4ecef8ad9ca31a8372d0c353",
9494
) as response:
9595
assert not response.is_closed
@@ -104,6 +104,6 @@ async def test_streaming_response_transform(self, async_client: AsyncCloudflare)
104104
async def test_path_params_transform(self, async_client: AsyncCloudflare) -> None:
105105
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
106106
await async_client.ai.to_markdown.with_raw_response.transform(
107-
body=b"raw file contents",
107+
file=b"raw file contents",
108108
account_id="",
109109
)

0 commit comments

Comments
 (0)