Skip to content

Commit 4f43db3

Browse files
Wauplingithub-actions[bot]
authored andcommitted
Update tasks specs (automated commit)
1 parent a2ad9ea commit 4f43db3

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

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

Lines changed: 6 additions & 1 deletion
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
*/
@@ -38,4 +43,4 @@ export interface FeatureExtractionInput {
3843
* The text or list of texts to embed.
3944
*/
4045
export type FeatureExtractionInputs = string[] | string;
41-
export type FeatureExtractionInputTruncationDirection = "left" | "right";
46+
export type FeatureExtractionInputTruncationDirection = "Left" | "Right";

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

Lines changed: 9 additions & 1 deletion
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.",
@@ -51,7 +59,7 @@
5159
"$defs": {
5260
"FeatureExtractionInputTruncationDirection": {
5361
"type": "string",
54-
"enum": ["left", "right"],
62+
"enum": ["Left", "Right"],
5563
"title": "FeatureExtractionInputTruncationDirection"
5664
}
5765
}

0 commit comments

Comments
 (0)