Package ai.nexconn.chat.translate.model
Class TranslateTextParam
-
- All Implemented Interfaces:
public final class TranslateTextParamTranslate text parameters.
Used to specify the text content to translate and its language settings.
-
-
Field Summary
Fields Modifier and Type Field Description private StringsourceLanguageprivate StringtargetLanguageprivate final Stringtext
-
Constructor Summary
Constructors Constructor Description TranslateTextParam(String text)
-
Method Summary
Modifier and Type Method Description final StringgetSourceLanguage()Source language. final UnitsetSourceLanguage(String sourceLanguage)Source language. final StringgetTargetLanguage()Target language. final UnitsetTargetLanguage(String targetLanguage)Target language. final StringgetText()-
-
Method Detail
-
getSourceLanguage
final String getSourceLanguage()
Source language.
Defaults to "auto", which auto-detects the source language.
-
setSourceLanguage
final Unit setSourceLanguage(String sourceLanguage)
Source language.
Defaults to "auto", which auto-detects the source language.
-
getTargetLanguage
final String getTargetLanguage()
Target language.
Optional. If not provided, uses the user-level configuration. If no configuration is available, defaults to the original text.
-
setTargetLanguage
final Unit setTargetLanguage(String targetLanguage)
Target language.
Optional. If not provided, uses the user-level configuration. If no configuration is available, defaults to the original text.
-
getText
final String getText()
-
-
-
-