Skip to content

Commit

Permalink
[Tasks] Rename generate property in task specs (#930)
Browse files Browse the repository at this point in the history
Fixes #923 

This PR updates the task specs to rename the `generate` property to
`generation_parameters`. This change aligns with the discussion in the
issue.

Key changes: 
- Renamed `generate` to `generation_parameters` in the specs for
`automatic-speech-recognition`, `image-to-text`, `text-to-audio` and
`text-to-speech` tasks.
  • Loading branch information
hanouticelina authored Sep 30, 2024
1 parent 1d8173e commit 1896180
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface AutomaticSpeechRecognitionParameters {
/**
* Parametrization of the text generation process
*/
generate?: GenerationParameters;
generation_parameters?: GenerationParameters;
/**
* Whether to output corresponding timestamps with the generated text
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"type": "boolean",
"description": "Whether to output corresponding timestamps with the generated text"
},
"generate": {
"generation_parameters": {
"description": "Parametrization of the text generation process",
"$ref": "/inference/schemas/common-definitions.json#/definitions/GenerationParameters"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/tasks/src/tasks/image-to-text/inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface ImageToTextParameters {
/**
* Parametrization of the text generation process
*/
generate?: GenerationParameters;
generation_parameters?: GenerationParameters;
/**
* The amount of maximum tokens to generate.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/tasks/src/tasks/image-to-text/spec/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"type": "integer",
"description": "The amount of maximum tokens to generate."
},
"generate": {
"generation_parameters": {
"description": "Parametrization of the text generation process",
"$ref": "/inference/schemas/common-definitions.json#/definitions/GenerationParameters"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/tasks/src/tasks/text-to-audio/inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface TextToAudioParameters {
/**
* Parametrization of the text generation process
*/
generate?: GenerationParameters;
generation_parameters?: GenerationParameters;
[property: string]: unknown;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/tasks/src/tasks/text-to-audio/spec/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"description": "Additional inference parameters for Text To Audio",
"type": "object",
"properties": {
"generate": {
"generation_parameters": {
"description": "Parametrization of the text generation process",
"$ref": "/inference/schemas/common-definitions.json#/definitions/GenerationParameters"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/tasks/src/tasks/text-to-speech/inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface TextToSpeechParameters {
/**
* Parametrization of the text generation process
*/
generate?: GenerationParameters;
generation_parameters?: GenerationParameters;
[property: string]: unknown;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/tasks/src/tasks/text-to-speech/spec/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"description": "Additional inference parameters for Text To Speech",
"type": "object",
"properties": {
"generate": {
"generation_parameters": {
"description": "Parametrization of the text generation process",
"$ref": "/inference/schemas/common-definitions.json#/definitions/GenerationParameters"
}
Expand Down

0 comments on commit 1896180

Please sign in to comment.