Class Image

java.lang.Object
dev.langchain4j.data.image.Image

public final class Image extends Object
Represents an image as a URL or as a Base64-encoded string.
  • Method Details

    • builder

      public static Image.Builder builder()
      Create a new Image.Builder.
      Returns:
      the new Image.Builder.
    • url

      public URI url()
      Get the url of the image.
      Returns:
      the url of the image, or null if not set.
    • base64Data

      public String base64Data()
      Get the base64 data of the image.
      Returns:
      the base64 data of the image, or null if not set.
    • mimeType

      public String mimeType()
      Get the mime type of the image.
      Returns:
      the mime type of the image, or null if not set.
    • revisedPrompt

      public String revisedPrompt()
      Get the revised prompt of the image.
      Returns:
      the revised prompt of the image, or null if not set.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object