Class WanxImageModel

java.lang.Object
dev.langchain4j.model.dashscope.WanxImageModel
All Implemented Interfaces:
ImageModel

public class WanxImageModel extends Object implements ImageModel
Represents a Wanx models to generate artistic images. More details are available here.
  • Constructor Details

  • Method Details

    • generate

      public Response<Image> generate(String prompt)
      Description copied from interface: ImageModel
      Given a prompt, generate an image.
      Specified by:
      generate in interface ImageModel
      Parameters:
      prompt - The prompt to generate an image from.
      Returns:
      The generated image Response.
    • generate

      public Response<List<Image>> generate(String prompt, int n)
      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 interface ImageModel
      Parameters:
      prompt - The prompt to generate images from.
      n - The number of images to generate.
      Returns:
      The generated images Response.
    • edit

      public Response<Image> edit(Image image, String prompt)
      Description copied from interface: ImageModel
      Given an existing image, edit this image following the given prompt.
      Specified by:
      edit in interface ImageModel
      Parameters:
      image - The image to be edited.
      prompt - The prompt to edit the image.
      Returns:
      The generated image Response.
    • builder

      public static WanxImageModel.WanxImageModelBuilder builder()