类 ImageContent

java.lang.Object
dev.langchain4j.data.message.ImageContent
所有已实现的接口:
Content

public class ImageContent extends Object implements Content
Represents an image with a DetailLevel.
  • 构造器详细资料

    • ImageContent

      public ImageContent(URI url)
      Create a new ImageContent from the given url.

      The image will be created with DetailLevel.LOW detail.

      参数:
      url - the url of the image.
    • ImageContent

      public ImageContent(String url)
      Create a new ImageContent from the given url.

      The image will be created with DetailLevel.LOW detail.

      参数:
      url - the url of the image.
    • ImageContent

      public ImageContent(URI url, ImageContent.DetailLevel detailLevel)
      Create a new ImageContent from the given url and detail level.
      参数:
      url - the url of the image.
      detailLevel - the detail level of the image.
    • ImageContent

      public ImageContent(String url, ImageContent.DetailLevel detailLevel)
      Create a new ImageContent from the given url and detail level.
      参数:
      url - the url of the image.
      detailLevel - the detail level of the image.
    • ImageContent

      public ImageContent(String base64Data, String mimeType)
      Create a new ImageContent from the given base64 data and mime type.

      The image will be created with DetailLevel.LOW detail.

      参数:
      base64Data - the base64 data of the image.
      mimeType - the mime type of the image.
    • ImageContent

      public ImageContent(String base64Data, String mimeType, ImageContent.DetailLevel detailLevel)
      Create a new ImageContent from the given base64 data and mime type.
      参数:
      base64Data - the base64 data of the image.
      mimeType - the mime type of the image.
      detailLevel - the detail level of the image.
    • ImageContent

      public ImageContent(Image image)
      Create a new ImageContent from the given image.

      The image will be created with DetailLevel.LOW detail.

      参数:
      image - the image.
    • ImageContent

      public ImageContent(Image image, ImageContent.DetailLevel detailLevel)
      Create a new ImageContent from the given image.
      参数:
      image - the image.
      detailLevel - the detail level of the image.
  • 方法详细资料