Skip to content

Commit

Permalink
Update tasks specs (automated commit)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wauplin authored and github-actions[bot] committed Feb 5, 2025
1 parent 493ee5f commit acf9eb1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions packages/tasks/src/tasks/feature-extraction/inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ export type FeatureExtractionOutput = Array<number[]>;
*/
export interface FeatureExtractionInput {
/**
* The text or list of texts to embed.
* The text to embed.
*/
inputs: FeatureExtractionInputs;
inputs: string;
normalize?: boolean;
/**
* The name of the prompt that should be used by for encoding. If not set, no prompt
Expand All @@ -34,8 +34,4 @@ export interface FeatureExtractionInput {
truncation_direction?: FeatureExtractionInputTruncationDirection;
[property: string]: unknown;
}
/**
* The text or list of texts to embed.
*/
export type FeatureExtractionInputs = string[] | string;
export type FeatureExtractionInputTruncationDirection = "Left" | "Right";
8 changes: 2 additions & 6 deletions packages/tasks/src/tasks/feature-extraction/spec/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
"required": ["inputs"],
"properties": {
"inputs": {
"title": "FeatureExtractionInputs",
"oneOf": [
{ "type": "string" },
{ "type": "array", "items": { "type": "string" } }
],
"description": "The text or list of texts to embed."
"type": "string",
"description": "The text to embed."
},
"normalize": {
"type": "boolean",
Expand Down

0 comments on commit acf9eb1

Please sign in to comment.