From 5a0f6390bd8d3eba329a8f5b3855429c7c8d74d1 Mon Sep 17 00:00:00 2001 From: Win Cheng Date: Thu, 18 Sep 2025 10:59:13 -0700 Subject: [PATCH 1/2] now takes object instead of object detection --- src/vision/interfaces.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vision/interfaces.ts b/src/vision/interfaces.ts index ae1cfd4..1a1bbb8 100644 --- a/src/vision/interfaces.ts +++ b/src/vision/interfaces.ts @@ -32,7 +32,7 @@ export type ObjectDetectionParams = { url?: string; file_store_key?: string; prompts?: string[]; - features?: ("object_detection" | "gui")[]; + features?: ("object" | "gui")[]; annotated_image?: boolean; return_type?: "url" | "base64"; return_masks?: boolean; From a4a5457582eca8b73f91e5a8375afc0b4c08a2c2 Mon Sep 17 00:00:00 2001 From: Win Cheng Date: Fri, 19 Sep 2025 16:49:31 -0700 Subject: [PATCH 2/2] updated test --- tests/vision.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/vision.test.ts b/tests/vision.test.ts index efba724..8dee80f 100644 --- a/tests/vision.test.ts +++ b/tests/vision.test.ts @@ -466,7 +466,7 @@ describe("Object Detection API", () => { test("should work with object_detection feature", async () => { const result = await client.vision.object_detection({ url: TEST_URLS.image, - features: ["object_detection"], + features: ["object"], }); expectSuccess(result); @@ -506,7 +506,7 @@ describe("Object Detection API", () => { test("should work with both object_detection and gui features", async () => { const result = await client.vision.object_detection({ url: TEST_URLS.image, - features: ["object_detection", "gui"], + features: ["object", "gui"], }); expectSuccess(result); @@ -727,7 +727,7 @@ describe("Object Detection API", () => { const result = await client.vision.object_detection({ url: TEST_URLS.image, prompts: ["detect all objects", "find text elements"], - features: ["object_detection", "gui"], + features: ["object", "gui"], annotated_image: true, return_type: "url", });