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

public Class FetchAiModelsBackgroundTask

extends BackgroundTask<List<String>>
Class Inheritance
Annotations
@NullMarked
Imports
java.util.List, org.jabref.logic.ai.AiNamingUtils, org.jabref.logic.l10n.Localization, org.jabref.logic.util.BackgroundTask, org.jabref.model.ai.llm.AiProvider, org.jspecify.annotations.NullMarked, .Nullable

Background task for fetching AI models from a provider's API.

Field Summary

Modifier and TypeField and Description
private final AiModelService
private final AiProvider
private final String
private final @Nullable String

Constructor Summary

AccessConstructor and Description
public
FetchAiModelsBackgroundTask(AiModelService aiModelService, AiProvider aiProvider, String apiBaseUrl, @Nullable String apiKey)

Method Summary

Modifier and TypeMethod and Description
public List<String>
private void
Inherited from org.jabref.logic.util.BackgroundTask:
cancelcancelconsumeOnRunningexecuteWithgetOnExceptiongetOnRunninggetOnSuccessgetProgressgetWorkDonePercentageisCancelledisCancelledPropertymayInterruptIfRunningPropertymessagePropertyonFailureonFinishedonRunningonSuccessprogressPropertyscheduleWithsetTitleshowToUsershowToUsershowToUserPropertythenthenRunthenRuntitlePropertyupdateMessageupdateProgressupdateProgresswillBeRecoveredAutomaticallywillBeRecoveredAutomaticallywithInitialMessageworkDonePercentagePropertywrapwrap

Field Detail

aiModelServiceback to summary
private final AiModelService aiModelService
aiProviderback to summary
private final AiProvider aiProvider
apiBaseUrlback to summary
private final String apiBaseUrl
apiKeyback to summary
private final @Nullable String apiKey

Constructor Detail

FetchAiModelsBackgroundTaskback to summary
public FetchAiModelsBackgroundTask(AiModelService aiModelService, AiProvider aiProvider, String apiBaseUrl, @Nullable String apiKey)

Method Detail

callback to summary
public List<String> call()

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

Annotations
@Override
configureback to summary
private void configure()