Package ai.nexconn.chat.params
Class TranslateMessagesParams
-
- All Implemented Interfaces:
public final class TranslateMessagesParamsTranslate message parameters.
Used for Batch Translate message request Parameter, Contains Message list, Whether force re- New translation and Translation mode.
Usage Example:
val params = TranslateMessagesParams( listOf( TranslateMessageParam("messageId1"), TranslateMessageParam("messageId2").apply { targetLanguage = "en" } ) ).apply { force = true mode = TranslateMode.INTELLIGENT } NCEngine.translate.translateMessages(params) { error -> if (error == null) { } } }Default is false.
-
-
Field Summary
Fields Modifier and Type Field Description private Booleanforceprivate TranslateModemodeprivate final List<TranslateMessageParam>list
-
Constructor Summary
Constructors Constructor Description TranslateMessagesParams(List<TranslateMessageParam> list)
-
Method Summary
Modifier and Type Method Description final BooleangetForce()Whether to force re-translate even if a translation already exists. final UnitsetForce(Boolean force)Whether to force re-translate even if a translation already exists. final TranslateModegetMode()Translation mode. final UnitsetMode(TranslateMode mode)Translation mode. final List<TranslateMessageParam>getList()-
-
Constructor Detail
-
TranslateMessagesParams
TranslateMessagesParams(List<TranslateMessageParam> list)
-
-
Method Detail
-
getForce
final Boolean getForce()
Whether to force re-translate even if a translation already exists.
Default is false.
-
setForce
final Unit setForce(Boolean force)
Whether to force re-translate even if a translation already exists.
Default is false.
-
getMode
final TranslateMode getMode()
Translation mode.
Default is TranslateMode.MECHANICAL (mechanical translation).
-
setMode
final Unit setMode(TranslateMode mode)
Translation mode.
Default is TranslateMode.MECHANICAL (mechanical translation).
-
getList
final List<TranslateMessageParam> getList()
-
-
-
-