Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bot] Update tasks specs #1178

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading