Top Description Fields Constructors Methods
org.jabref.logic.ai

public Class AiService

extends Object
implements AutoCloseable
Class Inheritance
All Implemented Interfaces
java.lang.AutoCloseable
Imports
java.util.concurrent.ExecutorService, .Executors, javafx.beans.property.BooleanProperty, .SimpleBooleanProperty, org.jabref.logic.FilePreferences, org.jabref.logic.ai.chatting.AiChatService, .ChatHistoryService, org.jabref.logic.ai.chatting.chathistory.storages.MVStoreChatHistoryStorage, org.jabref.logic.ai.chatting.model.JabRefChatLanguageModel, org.jabref.logic.ai.ingestion.IngestionService, .MVStoreEmbeddingStore, org.jabref.logic.ai.ingestion.model.JabRefEmbeddingModel, org.jabref.logic.ai.ingestion.storages.MVStoreFullyIngestedDocumentsTracker, org.jabref.logic.ai.summarization.SummariesService, org.jabref.logic.ai.summarization.storages.MVStoreSummariesStorage, org.jabref.logic.ai.templates.TemplatesService, org.jabref.logic.citationkeypattern.CitationKeyPatternPreferences, org.jabref.logic.util.Directories, .NotificationService, .TaskExecutor, org.jabref.model.database.BibDatabaseContext, com.google.common.util.concurrent.ThreadFactoryBuilder

The main class for the AI functionality.

Holds all the AI components: LLM and embedding model, chat history and embeddings cache.

Field Summary

Modifier and TypeField and Description
private final AiChatService
private final ExecutorService
private static final String
private final ChatHistoryService
private static final String
private static final String
private final IngestionService
private final JabRefChatLanguageModel
private final JabRefEmbeddingModel
private final MVStoreChatHistoryStorage
private final MVStoreEmbeddingStore
private final MVStoreFullyIngestedDocumentsTracker
private final MVStoreSummariesStorage
private final BooleanProperty
private static final String
private final SummariesService
public static final String

Constructor Summary

AccessConstructor and Description
public
AiService(AiPreferences aiPreferences, FilePreferences filePreferences, CitationKeyPatternPreferences citationKeyPatternPreferences, NotificationService notificationService, TaskExecutor taskExecutor)

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.lang.AutoCloseable.close.

Closes this resource, relinquishing any underlying resources.

public AiChatService
public ChatHistoryService
public JabRefChatLanguageModel
public JabRefEmbeddingModel
public IngestionService
public SummariesService
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aiChatServiceback to summary
private final AiChatService aiChatService
cachedThreadPoolback to summary
private final ExecutorService cachedThreadPool
CHAT_HISTORY_FILE_NAMEback to summary
private static final String CHAT_HISTORY_FILE_NAME
chatHistoryServiceback to summary
private final ChatHistoryService chatHistoryService
EMBEDDINGS_FILE_NAMEback to summary
private static final String EMBEDDINGS_FILE_NAME
FULLY_INGESTED_FILE_NAMEback to summary
private static final String FULLY_INGESTED_FILE_NAME
ingestionServiceback to summary
private final IngestionService ingestionService
jabRefChatLanguageModelback to summary
private final JabRefChatLanguageModel jabRefChatLanguageModel
jabRefEmbeddingModelback to summary
private final JabRefEmbeddingModel jabRefEmbeddingModel
mvStoreChatHistoryStorageback to summary
private final MVStoreChatHistoryStorage mvStoreChatHistoryStorage
mvStoreEmbeddingStoreback to summary
private final MVStoreEmbeddingStore mvStoreEmbeddingStore
mvStoreFullyIngestedDocumentsTrackerback to summary
private final MVStoreFullyIngestedDocumentsTracker mvStoreFullyIngestedDocumentsTracker
mvStoreSummariesStorageback to summary
private final MVStoreSummariesStorage mvStoreSummariesStorage
shutdownSignalback to summary
private final BooleanProperty shutdownSignal
SUMMARIES_FILE_NAMEback to summary
private static final String SUMMARIES_FILE_NAME
summariesServiceback to summary
private final SummariesService summariesService
VERSIONback to summary
public static final String VERSION

Constructor Detail

AiServiceback to summary
public AiService(AiPreferences aiPreferences, FilePreferences filePreferences, CitationKeyPatternPreferences citationKeyPatternPreferences, NotificationService notificationService, TaskExecutor taskExecutor)

Method Detail

closeback to summary
public void close()

Implements java.lang.AutoCloseable.close.

Doc from java.lang.AutoCloseable.close.

Closes this resource, relinquishing any underlying resources. This method is invoked automatically on objects managed by the try-with-resources statement.

Annotations
@Override
getAiChatServiceback to summary
public AiChatService getAiChatService()
getChatHistoryServiceback to summary
public ChatHistoryService getChatHistoryService()
getChatLanguageModelback to summary
public JabRefChatLanguageModel getChatLanguageModel()
getEmbeddingModelback to summary
public JabRefEmbeddingModel getEmbeddingModel()
getIngestionServiceback to summary
public IngestionService getIngestionService()
getSummariesServiceback to summary
public SummariesService getSummariesService()
setupDatabaseback to summary
public void setupDatabase(BibDatabaseContext context)