Skip to content

Commit c3581f5

Browse files
author
stlc-bot
committed
feat(scrape): add productParams.dedupeImages, always run product AI fallback (#1423)
Stainless-Generated-From: e04e759
1 parent 64ee998 commit c3581f5

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/context/dev/types/web_scrape_params.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ class ParseParams(TypedDict, total=False):
200200
class ProductParams(TypedDict, total=False):
201201
"""Product options. Requires formats.product: true."""
202202

203-
use_ai_fallback: Annotated[bool, PropertyInfo(alias="useAIFallback")]
204-
"""Use an AI model when the page has no structured product data."""
203+
dedupe_images: Annotated[bool, PropertyInfo(alias="dedupeImages")]
204+
"""Drop visually duplicate product images, keeping the largest copy."""
205205

206206

207207
class ScreenshotParamsAreaElement(TypedDict, total=False):

‎tests/api_resources/test_web.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def test_method_scrape_with_all_params(self, client: ContextDev) -> None:
285285
},
286286
}
287287
},
288-
product_params={"use_ai_fallback": True},
288+
product_params={"dedupe_images": True},
289289
screenshot_params={
290290
"area": "viewport",
291291
"format": "png",
@@ -826,7 +826,7 @@ async def test_method_scrape_with_all_params(self, async_client: AsyncContextDev
826826
},
827827
}
828828
},
829-
product_params={"use_ai_fallback": True},
829+
product_params={"dedupe_images": True},
830830
screenshot_params={
831831
"area": "viewport",
832832
"format": "png",

0 commit comments

Comments
 (0)