Verified Owner
Top Description Constructors Methods
org.jabref.logic.ai.embedding

public final Class EmbeddingModelFactory

extends Object
Class Inheritance
Imports
org.jabref.logic.ai.preferences.AiPreferences

Static factory for creating AsyncEmbeddingModel instances via an EmbeddingModelCache. Always use the cache so that only one instance (and one background download/load task) is ever created per embedding model name.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static AsyncEmbeddingModel
create(String embeddingModelName, EmbeddingModelCache cache)

Returns the cached AsyncEmbeddingModel for the given model name, creating it on first access so that only one background task is ever launched per model name.

public static AsyncEmbeddingModel
create(AiPreferences aiPreferences, EmbeddingModelCache cache)

Convenience overload that reads the embedding model kind from AiPreferences.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

EmbeddingModelFactoryback to summary
private EmbeddingModelFactory()

Method Detail

createback to summary
public static AsyncEmbeddingModel create(String embeddingModelName, EmbeddingModelCache cache)

Returns the cached AsyncEmbeddingModel for the given model name, creating it on first access so that only one background task is ever launched per model name.

createback to summary
public static AsyncEmbeddingModel create(AiPreferences aiPreferences, EmbeddingModelCache cache)

Convenience overload that reads the embedding model kind from AiPreferences.