Skip to main content

//clika-runtime/io.clika.modelverse/TranslateListener

TranslateListener

[common]
interface TranslateListener

The outcome of one translation request. The calls arrive on the model's own worker thread: onTranslations with one translation per input text, in order, then exactly one of onDone or onError.

Functions​

NameSummary
onDone[common]
abstract fun onDone(report: TranslateReport)
The request ended; report says what it cost.
onError[common]
abstract fun onError(message: String)
The request failed, or was refused before the model ran; nothing follows.
onTranslations[common]
abstract fun onTranslations(translations: List<Translation>)