Verified Owner
Top Inners Fields Constructors Methods
org.jabref.logic.ai.ingestion.listeners

public Class GenerateEmbeddingsAiDatabaseListener

extends Object
implements AiDatabaseListener
Class Inheritance
All Implemented Interfaces
org.jabref.logic.ai.AiDatabaseListener, java.lang.AutoCloseable
Imports
javafx.beans.binding.Bindings, javafx.beans.property.ObjectProperty, .SimpleObjectProperty, org.jabref.logic.FilePreferences, org.jabref.logic.ai.AiDatabaseListener, org.jabref.logic.ai.embedding.EmbeddingModelCache, org.jabref.logic.ai.ingestion.IngestionTaskAggregator, org.jabref.logic.ai.ingestion.logic.documentsplitting.DocumentSplitter, org.jabref.logic.ai.ingestion.repositories.IngestedDocumentsRepository, org.jabref.logic.ai.ingestion.tasks.generateembeddings.GenerateEmbeddingsTaskRequest, org.jabref.logic.ai.ingestion.util.DocumentSplitterFactory, org.jabref.logic.ai.preferences.AiPreferences, org.jabref.model.database.BibDatabaseContext, org.jabref.model.database.event.EntriesAddedEvent, org.jabref.model.entry.LinkedFile, org.jabref.model.entry.event.FieldChangedEvent, org.jabref.model.entry.field.StandardField, org.jabref.model.util.ListUtil, com.google.common.eventbus.Subscribe, dev.langchain4j.data.segment.TextSegment, dev.langchain4j.store.embedding.EmbeddingStore

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final AiPreferences
private final ObjectProperty<DocumentSplitter>
private final EmbeddingModelCache
private final dev.langchain4j.store.embedding.EmbeddingStore<dev.langchain4j.data.segment.TextSegment>
private final FilePreferences
private final IngestedDocumentsRepository
private final IngestionTaskAggregator

Constructor Summary

AccessConstructor and Description
public
GenerateEmbeddingsAiDatabaseListener(AiPreferences aiPreferences, FilePreferences filePreferences, IngestedDocumentsRepository ingestedDocumentsRepository, dev.langchain4j.store.embedding.EmbeddingStore<dev.langchain4j.data.segment.TextSegment> embeddingStore, EmbeddingModelCache embeddingModelCache, IngestionTaskAggregator ingestionTaskAggregator)

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.lang.AutoCloseable.close.

Closes this resource, relinquishing any underlying resources.

private void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aiPreferencesback to summary
private final AiPreferences aiPreferences
documentSplitterback to summary
private final ObjectProperty<DocumentSplitter> documentSplitter
embeddingModelCacheback to summary
private final EmbeddingModelCache embeddingModelCache
embeddingStoreback to summary
private final dev.langchain4j.store.embedding.EmbeddingStore<dev.langchain4j.data.segment.TextSegment> embeddingStore
filePreferencesback to summary
private final FilePreferences filePreferences
ingestedDocumentsRepositoryback to summary
private final IngestedDocumentsRepository ingestedDocumentsRepository
ingestionTaskAggregatorback to summary
private final IngestionTaskAggregator ingestionTaskAggregator

Constructor Detail

GenerateEmbeddingsAiDatabaseListenerback to summary
public GenerateEmbeddingsAiDatabaseListener(AiPreferences aiPreferences, FilePreferences filePreferences, IngestedDocumentsRepository ingestedDocumentsRepository, dev.langchain4j.store.embedding.EmbeddingStore<dev.langchain4j.data.segment.TextSegment> embeddingStore, EmbeddingModelCache embeddingModelCache, IngestionTaskAggregator ingestionTaskAggregator)

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
setupBindingsback to summary
private void setupBindings()
setupDatabaseback to summary
public void setupDatabase(BibDatabaseContext context)

Implements org.jabref.logic.ai.AiDatabaseListener.setupDatabase.

Annotations
@Override
org.jabref.logic.ai.ingestion.listeners back to summary

private Class GenerateEmbeddingsAiDatabaseListener.EntriesChangedListener

extends Object
Class Inheritance
  • java.lang.Object
  • org.jabref.logic.ai.ingestion.listeners.GenerateEmbeddingsAiDatabaseListener.EntriesChangedListener

Field Summary

Modifier and TypeField and Description
private final BibDatabaseContext

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
ingest(LinkedFile linkedFile)

public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextback to summary
private final BibDatabaseContext context

Constructor Detail

EntriesChangedListenerback to summary
public EntriesChangedListener(BibDatabaseContext context)

Method Detail

ingestback to summary
private void ingest(LinkedFile linkedFile)
listenback to summary
public void listen(EntriesAddedEvent e)
Annotations
@Subscribe
listenback to summary
public void listen(FieldChangedEvent e)
Annotations
@Subscribe