Skip to content

Commit a69a0dd

Browse files
authored
featureExtraction should use FeatureExtractionInput [v2] (#1239)
Following #1235 (comment), recreating #1235 because: 1. #1235 was merged without approval 2. #1238 reverted #1235 so that I can submit this PR
1 parent 256e1ea commit a69a0dd

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

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

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

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-
};
6+
export type FeatureExtractionArgs = BaseArgs & FeatureExtractionInput;
147

158
/**
169
* 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).

0 commit comments

Comments
 (0)