Skip to content

Commit b5230f9

Browse files
authored
Revert "featureExtraction should use FeatureExtractionInput (#1235)" (#1238)
This reverts commit e6332ab since it was merged without approval
1 parent 66253c7 commit b5230f9

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

packages/inference/src/tasks/nlp/featureExtraction.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
import type { FeatureExtractionInput } from "@huggingface/tasks";
21
import { InferenceOutputError } from "../../lib/InferenceOutputError";
32
import type { BaseArgs, Options } from "../../types";
43
import { request } from "../custom/request";
54

6-
export type FeatureExtractionArgs = BaseArgs & FeatureExtractionInput;
5+
export type FeatureExtractionArgs = BaseArgs & {
6+
/**
7+
* The inputs is a string or a list of strings to get the features from.
8+
*
9+
* inputs: "That is a happy person",
10+
*
11+
*/
12+
inputs: string | string[];
13+
};
714

815
/**
916
* Returned values are a multidimensional array of floats (dimension depending on if you sent a string or a list of string, and if the automatic reduction, usually mean_pooling for instance was applied for you or not. This should be explained on the model's README).

packages/inference/src/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ChatCompletionInput, FeatureExtractionInput, PipelineType } from "@huggingface/tasks";
1+
import type { ChatCompletionInput, PipelineType } from "@huggingface/tasks";
22

33
/**
44
* HF model id, like "meta-llama/Llama-3.3-70B-Instruct"
@@ -87,7 +87,6 @@ export type RequestArgs = BaseArgs &
8787
| { text: string }
8888
| { audio_url: string }
8989
| ChatCompletionInput
90-
| FeatureExtractionInput
9190
) & {
9291
parameters?: Record<string, unknown>;
9392
};

0 commit comments

Comments
 (0)