Skip to content

Commit a9d6531

Browse files
feat(api): api update
1 parent c936841 commit a9d6531

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 36
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-171b4c39eb26210aad8afd74d63d620bf45f7e0b7f2de3938c7239741ea3f2f4.yml
3-
openapi_spec_hash: 752c05fc817dc766061bd4357bd327ba
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-633097a61ae4e029434e5af07efa3017301fe8b391c27ada3eb68b61d798ef33.yml
3+
openapi_spec_hash: 051b08a4c6530546d520aa7ec18f8123
44
config_hash: 7ec4851ee8d93177947e95df5ae897b5

‎pkg/cmd/web.go‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,12 @@ var webWebScrapeImages = requestflag.WithInnerFlags(cli.Command{
646646
Required: true,
647647
QueryPath: "url",
648648
},
649+
&requestflag.Flag[bool]{
650+
Name: "dedupe",
651+
Usage: "When true, visually duplicate images are removed: every image is loaded and perceptually hashed, and only the highest-resolution copy of each duplicate group is kept. Images that cannot be downloaded or hashed are kept. Default: false.",
652+
Default: false,
653+
QueryPath: "dedupe",
654+
},
649655
&requestflag.Flag[map[string]any]{
650656
Name: "enrichment",
651657
Usage: "Optional per-image processing, sent as deep-object query params such as enrichment[resolution]=true.",

‎pkg/cmd/web_test.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ func TestWebWebScrapeImages(t *testing.T) {
421421
"--api-key", "string",
422422
"web", "web-scrape-images",
423423
"--url", "https://example.com",
424+
"--dedupe=true",
424425
"--enrichment", "{classification: true, hostedUrl: true, maxTimePerMs: 1, resolution: true}",
425426
"--headers", "{foo: J!}",
426427
"--max-age-ms", "0",
@@ -439,6 +440,7 @@ func TestWebWebScrapeImages(t *testing.T) {
439440
"--api-key", "string",
440441
"web", "web-scrape-images",
441442
"--url", "https://example.com",
443+
"--dedupe=true",
442444
"--enrichment.classification=true",
443445
"--enrichment.hosted-url=true",
444446
"--enrichment.max-time-per-ms", "1",

0 commit comments

Comments
 (0)