Skip to content

Commit 0becea5

Browse files
Wauplingithub-actions[bot]
authored andcommitted
Update tasks specs (automated commit)
1 parent 7d4e8d4 commit 0becea5

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

packages/tasks/src/tasks/feature-extraction/inference.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ export type FeatureExtractionOutput = Array<number[]>;
1212
* https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tei-import.ts.
1313
*/
1414
export interface FeatureExtractionInput {
15+
/**
16+
* The number of dimensions that the output embeddings should have. If not set, the original
17+
* shape of the representation will be returned instead.
18+
*/
19+
dimensions?: number;
1520
/**
1621
* The text or list of texts to embed.
1722
*/

packages/tasks/src/tasks/feature-extraction/spec/input.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
"type": "object",
77
"required": ["inputs"],
88
"properties": {
9+
"dimensions": {
10+
"type": "integer",
11+
"description": "The number of dimensions that the output embeddings should have. If not set, the original\nshape of the representation will be returned instead.",
12+
"default": "null",
13+
"example": "null",
14+
"nullable": true,
15+
"minimum": 0
16+
},
917
"inputs": {
1018
"title": "FeatureExtractionInputs",
1119
"description": "The text or list of texts to embed.",

0 commit comments

Comments
 (0)