From 024fa02c935b2dae0b0af68db17e9d4d907f1424 Mon Sep 17 00:00:00 2001 From: Wauplin <11801849+Wauplin@users.noreply.github.com> Date: Mon, 13 Oct 2025 03:26:55 +0000 Subject: [PATCH] Update tasks specs (automated commit) --- packages/tasks/src/tasks/feature-extraction/inference.ts | 5 +++++ .../tasks/src/tasks/feature-extraction/spec/input.json | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/packages/tasks/src/tasks/feature-extraction/inference.ts b/packages/tasks/src/tasks/feature-extraction/inference.ts index 9317d38ac3..9049a45c46 100644 --- a/packages/tasks/src/tasks/feature-extraction/inference.ts +++ b/packages/tasks/src/tasks/feature-extraction/inference.ts @@ -12,6 +12,11 @@ export type FeatureExtractionOutput = Array; * https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tei-import.ts. */ export interface FeatureExtractionInput { + /** + * The number of dimensions that the output embeddings should have. If not set, the original + * shape of the representation will be returned instead. + */ + dimensions?: number; /** * The text or list of texts to embed. */ diff --git a/packages/tasks/src/tasks/feature-extraction/spec/input.json b/packages/tasks/src/tasks/feature-extraction/spec/input.json index 55f58e5b88..5cd311946b 100644 --- a/packages/tasks/src/tasks/feature-extraction/spec/input.json +++ b/packages/tasks/src/tasks/feature-extraction/spec/input.json @@ -6,6 +6,14 @@ "type": "object", "required": ["inputs"], "properties": { + "dimensions": { + "type": "integer", + "description": "The number of dimensions that the output embeddings should have. If not set, the original\nshape of the representation will be returned instead.", + "default": "null", + "example": "null", + "nullable": true, + "minimum": 0 + }, "inputs": { "title": "FeatureExtractionInputs", "description": "The text or list of texts to embed.",