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 Link icon

    • builder Link icon

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

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

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

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

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

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

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

      public String toString()
      Overrides:
      toString in class Object