Skip to content

Commit a221df4

Browse files
Wauplingithub-actions[bot]
authored andcommitted
Update tasks specs (automated commit)
1 parent e3c0af1 commit a221df4

3 files changed

Lines changed: 18 additions & 5 deletions

File tree

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,14 @@ export type FeatureExtractionOutput = Array<number[]>;
99
*
1010
* Auto-generated from TEI specs.
1111
* For more details, check out
12-
* https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tei-import.ts.
12+
* https://github.com/huggingface/huggingface.js/blob/main/packages/tasks-gen/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: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
{
22
"$id": "/inference/schemas/feature-extraction/input.json",
33
"$schema": "http://json-schema.org/draft-06/schema#",
4-
"description": "Feature Extraction Input.\n\nAuto-generated from TEI specs.\nFor more details, check out https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tei-import.ts.",
4+
"description": "Feature Extraction Input.\n\nAuto-generated from TEI specs.\nFor more details, check out https://github.com/huggingface/huggingface.js/blob/main/packages/tasks-gen/scripts/inference-tei-import.ts.",
55
"title": "FeatureExtractionInput",
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
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$id": "/inference/schemas/feature-extraction/output.json",
33
"$schema": "http://json-schema.org/draft-06/schema#",
4-
"description": "Feature Extraction Output.\n\nAuto-generated from TEI specs.\nFor more details, check out https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tei-import.ts.",
4+
"description": "Feature Extraction Output.\n\nAuto-generated from TEI specs.\nFor more details, check out https://github.com/huggingface/huggingface.js/blob/main/packages/tasks-gen/scripts/inference-tei-import.ts.",
55
"title": "FeatureExtractionOutput",
66
"type": "array",
77
"$defs": {},

0 commit comments

Comments
 (0)