Class OllamaImageModel
java.lang.Object
dev.langchain4j.model.ollama.OllamaImageModel
- All Implemented Interfaces:
ImageModel
Experimental Ollama image generation model.
Supports text-to-image generation through Ollama's /api/generate endpoint. Generated images
are returned as PNG Base64 data. Image editing and multi-image generation are not supported.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classException thrown when Ollama does not return an image.static class -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ImageModel
edit, edit, generate
-
Constructor Details
-
OllamaImageModel
-
-
Method Details
-
builder
-
modelName
-
generate
Description copied from interface:ImageModelGiven a prompt, generate an image.- Specified by:
generatein interfaceImageModel- Parameters:
prompt- The prompt to generate an image from.- Returns:
- The generated image Response.
-