Class AutotranslateModelCompareModel
- java.lang.Object
 - 
- com.composum.ai.aem.core.impl.autotranslate.AutotranslateModelCompareModel
 
 
- 
@Model(adaptables=org.apache.sling.api.SlingHttpServletRequest.class, defaultInjectionStrategy=OPTIONAL) public class AutotranslateModelCompareModel extends ObjectModel for the auto-translate comparison page. This model handles the translation process and provides the results. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAutotranslateModelCompareModel.TranslationResult 
- 
Field Summary
Fields Modifier and Type Field Description protected GPTBackendsServicegptBackendsServiceprotected GPTTranslationServicegptTranslationService 
- 
Constructor Summary
Constructors Constructor Description AutotranslateModelCompareModel() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBackendList()StringgetError()List<String>getModels()StringgetParsedTargetLanguage()The actual textual representation of the target language, used with the model.List<AutotranslateModelCompareModel.TranslationResult>getResults()Determine the translation results.protected voidinit() 
 - 
 
- 
- 
Field Detail
- 
gptBackendsService
protected GPTBackendsService gptBackendsService
 
- 
gptTranslationService
protected GPTTranslationService gptTranslationService
 
 - 
 
- 
Method Detail
- 
init
@PostConstruct protected void init()
 
- 
getBackendList
public String getBackendList()
 
- 
getParsedTargetLanguage
public String getParsedTargetLanguage()
The actual textual representation of the target language, used with the model. 
- 
getError
public String getError()
 
- 
getResults
public List<AutotranslateModelCompareModel.TranslationResult> getResults()
Determine the translation results. Trigger all requests in parallel to save time. 
 - 
 
 -