Package dev.langchain4j.model.embedding
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:EmbeddingModel
Embed a text.- Specified by:
embed
in interfaceEmbeddingModel
- Parameters:
text
- the text to embed.- Returns:
- the embedding.
-
embed
Description copied from interface:EmbeddingModel
Embed the text content of a TextSegment.- Specified by:
embed
in interfaceEmbeddingModel
- Parameters:
textSegment
- the text segment to embed.- Returns:
- the embedding.
-
embedAll
Description copied from interface:EmbeddingModel
Embeds the text content of a list of TextSegments.- Specified by:
embedAll
in interfaceEmbeddingModel
- Parameters:
textSegments
- the text segments to embed.- Returns:
- the embeddings.
-