Package dev.langchain4j.model.image
Class DisabledImageModel
java.lang.Object
dev.langchain4j.model.image.DisabledImageModel
- All Implemented Interfaces:
ImageModel
An
ImageModel
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
Modifier and TypeMethodDescriptionGiven an existing image, edit this image following the given prompt and apply the changes only to the part of the image specified by the given mask.Given an existing image, edit this image following the given prompt.Given a prompt, generate an image.Given a prompt, generate n images.
-
Constructor Details
-
DisabledImageModel
public DisabledImageModel()
-
-
Method Details
-
generate
Description copied from interface:ImageModel
Given a prompt, generate an image.- Specified by:
generate
in interfaceImageModel
- Parameters:
prompt
- The prompt to generate an image from.- Returns:
- The generated image Response.
-
generate
Description copied from interface:ImageModel
Given a prompt, generate n images.Not supported by all models; as explicit support is needed to generate different images from the same prompt.
- Specified by:
generate
in interfaceImageModel
- Parameters:
prompt
- The prompt to generate images from.n
- The number of images to generate.- Returns:
- The generated images Response.
-
edit
Description copied from interface:ImageModel
Given an existing image, edit this image following the given prompt.- Specified by:
edit
in interfaceImageModel
- Parameters:
image
- The image to be edited.prompt
- The prompt to edit the image.- Returns:
- The generated image Response.
-
edit
Description copied from interface:ImageModel
Given an existing image, edit this image following the given prompt and apply the changes only to the part of the image specified by the given mask.- Specified by:
edit
in interfaceImageModel
- Parameters:
image
- The image to be edited.mask
- The image mask to apply to delimit the area to edit.prompt
- The prompt to edit the image.- Returns:
- The generated image Response.
-