Skip to content

Commit

Permalink
complete specs for translation and summarization
Browse files Browse the repository at this point in the history
  • Loading branch information
Wauplin committed Aug 28, 2024
1 parent f085780 commit 701ff69
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
9 changes: 8 additions & 1 deletion packages/tasks/src/tasks/summarization/spec/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,12 @@
"$id": "/inference/schemas/summarization/input.json",
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "SummarizationInput",
"description": "Inputs for Summarization inference"
"description": "Inputs for Summarization inference",
"properties": {
"inputs": {
"description": "The text to summarize.",
"type": "string"
}
},
"required": ["inputs"]
}
30 changes: 29 additions & 1 deletion packages/tasks/src/tasks/translation/spec/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,33 @@
"$id": "/inference/schemas/translation/input.json",
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "TranslationInput",
"description": "Inputs for Translation inference"
"description": "Inputs for Translation inference",
"properties": {
"inputs": {
"description": "The text to translate.",
"type": "string"
},
"parameters": {
"description": "Additional inference parameters",
"$ref": "#/$defs/TranslationParameters"
}
},
"$defs": {
"FillMaskParameters": {
"title": "TranslationParameters",
"description": "Additional inference parameters for Translation",
"type": "object",
"properties": {
"src_lang": {
"type": "string",
"description": "The source language of the text. Required for models that can translate from multiple languages."
},
"tgt_lang": {
"type": "string",
"description": "Target language to translate to. Required for models that can translate to multiple languages."
}
}
}
},
"required": ["inputs"]
}

0 comments on commit 701ff69

Please sign in to comment.