Package dev.langchain4j.model.language
Class DisabledLanguageModel
java.lang.Object
dev.langchain4j.model.language.DisabledLanguageModel
- All Implemented Interfaces:
LanguageModel
A
LanguageModel
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 Summary
-
Method Summary
-
Constructor Details
-
DisabledLanguageModel
public DisabledLanguageModel()
-
-
Method Details
-
generate
Description copied from interface:LanguageModel
Generate a response to the given prompt.- Specified by:
generate
in interfaceLanguageModel
- Parameters:
prompt
- the prompt.- Returns:
- the response.
-
generate
Description copied from interface:LanguageModel
Generate a response to the given prompt.- Specified by:
generate
in interfaceLanguageModel
- Parameters:
prompt
- the prompt.- Returns:
- the response.
-