Class OpenAiImageModel

java.lang.Object
dev.langchain4j.model.openai.OpenAiImageModel
All Implemented Interfaces:
dev.langchain4j.model.image.ImageModel

public class OpenAiImageModel extends Object implements dev.langchain4j.model.image.ImageModel
Represents an OpenAI DALLĀ·E models to generate artistic images. Versions 2 and 3 (default) are supported. Find the parameters description here.
  • Constructor Details

  • Method Details

    • modelName

      public String modelName()
    • generate

      public dev.langchain4j.model.output.Response<dev.langchain4j.data.image.Image> generate(String prompt)
      Specified by:
      generate in interface dev.langchain4j.model.image.ImageModel
    • generate

      public dev.langchain4j.model.output.Response<List<dev.langchain4j.data.image.Image>> generate(String prompt, int n)
      Specified by:
      generate in interface dev.langchain4j.model.image.ImageModel
    • builder