Description
Is this related to a new or existing framework?
isn't framework specific
Is this related to a new or existing API?
Predictions, convert
API
Is this related to another service?
Amazon Translate
Describe the feature you'd like to request
I would like to request support for Amazon Translate’s Brevity, Formality, and Profanity options in the Predictions category of Amplify JS. These options allow users to customize translations according to their needs:
- Brevity: Controls the length of translated output.
- Formality: Adjusts the formality level of the translated text.
- Profanity: Enables users to mask or remove profane words in translations.
Currently, Amplify Predictions does not expose these settings, which limits the flexibility of Amazon Translate integration. Adding support for these options would allow developers to fine-tune translations for different use cases, such as professional applications, casual conversations, or content moderation.
Describe the solution you'd like
I propose extending the translateText API in Amplify JS to include optional parameters for brevity, formality, and profanity handling, similar to how Amazon Translate provides them. This could be implemented as additional configuration fields when calling the Predictions API, for
Predictions.convert({
translateText: {
source: {
text: "Hello, how are you?",
language: "en",
},
targetLanguage: "fr",
options: {
formality: "formal", // "formal" or "informal"
brevity: "concise", // "concise" or "verbose"
profanity: "mask", // "mask", "remove", or "none"
}
}
})
.then(result => console.log(result.text))
.catch(err => console.error(err));
Describe alternatives you've considered
N/A
Additional context
No response
Is this something that you'd be interested in working on?
- 👋 I may be able to implement this feature request
-
⚠️ This feature might incur a breaking change