Verified Owner
Top Description Fields Constructors Methods
org.jabref.logic.ai.ingestion.tasks

public Class UpdateEmbeddingModelTask

extends BackgroundTask<DeepJavaEmbeddingModel>
Class Inheritance
Imports
java.io.IOException, org.jabref.logic.ai.embedding.DeepJavaEmbeddingModel, .EmbeddingModelMetadataService, org.jabref.logic.l10n.Localization, org.jabref.logic.util.BackgroundTask, .ProgressCounter, ai.djl.MalformedModelException, ai.djl.repository.zoo.ModelNotFoundException, org.jspecify.annotations.NonNull, org.slf4j.Logger, .LoggerFactory

Downloads (or verifies) the local embedding model and returns the ready-to-use DeepJavaEmbeddingModel. The caller is responsible for updating any property / field once the task succeeds (via onSuccess).

Field Summary

Modifier and TypeField and Description
private final String
private static final Logger
private final EmbeddingModelMetadataService
private final ProgressCounter

Constructor Summary

AccessConstructor and Description
public
UpdateEmbeddingModelTask(String embeddingModelName, EmbeddingModelMetadataService metadataService)

Method Summary

Modifier and TypeMethod and Description
public @NonNull DeepJavaEmbeddingModel
private void
private void
Inherited from org.jabref.logic.util.BackgroundTask:
cancelcancelconsumeOnRunningexecuteWithgetOnExceptiongetOnRunninggetOnSuccessgetProgressgetWorkDonePercentageisCancelledisCancelledPropertymayInterruptIfRunningPropertymessagePropertyonFailureonFinishedonRunningonSuccessprogressPropertyscheduleWithsetTitleshowToUsershowToUsershowToUserPropertythenthenRunthenRuntitlePropertyupdateMessageupdateProgressupdateProgresswillBeRecoveredAutomaticallywillBeRecoveredAutomaticallywithInitialMessageworkDonePercentagePropertywrapwrap

Field Detail

embeddingModelNameback to summary
private final String embeddingModelName
LOGGERback to summary
private static final Logger LOGGER

Hides org.jabref.logic.util.BackgroundTask.LOGGER.

metadataServiceback to summary
private final EmbeddingModelMetadataService metadataService
progressCounterback to summary
private final ProgressCounter progressCounter

Constructor Detail

UpdateEmbeddingModelTaskback to summary
public UpdateEmbeddingModelTask(String embeddingModelName, EmbeddingModelMetadataService metadataService)

Method Detail

callback to summary
public @NonNull DeepJavaEmbeddingModel call()

Implements abstract org.jabref.logic.util.BackgroundTask.call.

Annotations
@Override
configureback to summary
private void configure()
updateProgressback to summary
private void updateProgress()