From 6bc76dda6d269c7f997ab69886bb02e5ac9b12fc Mon Sep 17 00:00:00 2001 From: "LocalAI [bot]" <139863280+localai-bot@users.noreply.github.com> Date: Fri, 10 Apr 2026 01:05:53 +0200 Subject: [PATCH] feat(swagger): update swagger (#9300) Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com> --- swagger/docs.go | 29 +++++++++++++++++++++++++++++ swagger/swagger.json | 29 +++++++++++++++++++++++++++++ swagger/swagger.yaml | 22 ++++++++++++++++++++++ 3 files changed, 80 insertions(+) diff --git a/swagger/docs.go b/swagger/docs.go index 150fbf8a7..d556fd889 100644 --- a/swagger/docs.go +++ b/swagger/docs.go @@ -2698,9 +2698,16 @@ const docTemplate = `{ "class_name": { "type": "string" }, + "confidence": { + "type": "number" + }, "height": { "type": "number" }, + "mask": { + "description": "base64-encoded PNG segmentation mask", + "type": "string" + }, "width": { "type": "number" }, @@ -2715,12 +2722,34 @@ const docTemplate = `{ "schema.DetectionRequest": { "type": "object", "properties": { + "boxes": { + "description": "Box coordinates as [x1,y1,x2,y2,...] quads", + "type": "array", + "items": { + "type": "number" + } + }, "image": { "description": "URL or base64-encoded image to analyze", "type": "string" }, "model": { "type": "string" + }, + "points": { + "description": "Point coordinates as [x,y,label,...] triples (label: 1=pos, 0=neg)", + "type": "array", + "items": { + "type": "number" + } + }, + "prompt": { + "description": "Text prompt (for SAM 3 PCS mode)", + "type": "string" + }, + "threshold": { + "description": "Detection confidence threshold", + "type": "number" } } }, diff --git a/swagger/swagger.json b/swagger/swagger.json index 8ff0d5b69..8b952ff50 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -2695,9 +2695,16 @@ "class_name": { "type": "string" }, + "confidence": { + "type": "number" + }, "height": { "type": "number" }, + "mask": { + "description": "base64-encoded PNG segmentation mask", + "type": "string" + }, "width": { "type": "number" }, @@ -2712,12 +2719,34 @@ "schema.DetectionRequest": { "type": "object", "properties": { + "boxes": { + "description": "Box coordinates as [x1,y1,x2,y2,...] quads", + "type": "array", + "items": { + "type": "number" + } + }, "image": { "description": "URL or base64-encoded image to analyze", "type": "string" }, "model": { "type": "string" + }, + "points": { + "description": "Point coordinates as [x,y,label,...] triples (label: 1=pos, 0=neg)", + "type": "array", + "items": { + "type": "number" + } + }, + "prompt": { + "description": "Text prompt (for SAM 3 PCS mode)", + "type": "string" + }, + "threshold": { + "description": "Detection confidence threshold", + "type": "number" } } }, diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index 44f237707..18ef7786f 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -485,8 +485,13 @@ definitions: properties: class_name: type: string + confidence: + type: number height: type: number + mask: + description: base64-encoded PNG segmentation mask + type: string width: type: number x: @@ -496,11 +501,28 @@ definitions: type: object schema.DetectionRequest: properties: + boxes: + description: Box coordinates as [x1,y1,x2,y2,...] quads + items: + type: number + type: array image: description: URL or base64-encoded image to analyze type: string model: type: string + points: + description: 'Point coordinates as [x,y,label,...] triples (label: 1=pos, + 0=neg)' + items: + type: number + type: array + prompt: + description: Text prompt (for SAM 3 PCS mode) + type: string + threshold: + description: Detection confidence threshold + type: number type: object schema.DetectionResponse: properties: