Class DisabledEmbeddingModel
java.lang.Object
dev.langchain4j.model.embedding.DisabledEmbeddingModel
- All Implemented Interfaces:
EmbeddingModel
An
EmbeddingModel which throws a ModelDisabledException for all of its methods
This could be used in tests, or in libraries that extend this one to conditionally enable or disable functionality.
-
Constructor Details
-
DisabledEmbeddingModel
public DisabledEmbeddingModel()
-
-
Method Details
-
embed
Description copied from interface:EmbeddingModelEmbed a text.- Specified by:
embedin interfaceEmbeddingModel- Parameters:
text- the text to embed.- Returns:
- the embedding.
-
embed
Description copied from interface:EmbeddingModelEmbed the text content of a TextSegment.- Specified by:
embedin interfaceEmbeddingModel- Parameters:
textSegment- the text segment to embed.- Returns:
- the embedding.
-
embedAll
Description copied from interface:EmbeddingModelEmbeds the text content of a list of TextSegments.- Specified by:
embedAllin interfaceEmbeddingModel- Parameters:
textSegments- the text segments to embed.- Returns:
- the embeddings.
-