类 ImageContent
java.lang.Object
dev.langchain4j.data.message.ImageContent
- 所有已实现的接口:
Content
Represents an image with a DetailLevel.
-
嵌套类概要
嵌套类 -
构造器概要
构造器构造器说明ImageContent(Image image) Create a newImageContentfrom the given image.ImageContent(Image image, ImageContent.DetailLevel detailLevel) Create a newImageContentfrom the given image.ImageContent(String url) Create a newImageContentfrom the given url.ImageContent(String url, ImageContent.DetailLevel detailLevel) Create a newImageContentfrom the given url and detail level.ImageContent(String base64Data, String mimeType) Create a newImageContentfrom the given base64 data and mime type.ImageContent(String base64Data, String mimeType, ImageContent.DetailLevel detailLevel) Create a newImageContentfrom the given base64 data and mime type.ImageContent(URI url) Create a newImageContentfrom the given url.ImageContent(URI url, ImageContent.DetailLevel detailLevel) Create a newImageContentfrom the given url and detail level. -
方法概要
修饰符和类型方法说明Get theDetailLevel.booleanstatic ImageContentCreate a newImageContentfrom the given image.static ImageContentfrom(Image image, ImageContent.DetailLevel detailLevel) Create a newImageContentfrom the given image.static ImageContentCreate a newImageContentfrom the given url.static ImageContentfrom(String url, ImageContent.DetailLevel detailLevel) Create a newImageContentfrom the given url and detail level.static ImageContentCreate a newImageContentfrom the given base64 data and mime type.static ImageContentfrom(String base64Data, String mimeType, ImageContent.DetailLevel detailLevel) Create a newImageContentfrom the given base64 data and mime type.static ImageContentCreate a newImageContentfrom the given url.static ImageContentfrom(URI url, ImageContent.DetailLevel detailLevel) Create a newImageContentfrom the given url and detail level.inthashCode()image()Get theImage.toString()type()Returns the type of content.
-
构造器详细资料
-
ImageContent
Create a newImageContentfrom the given url.The image will be created with
DetailLevel.LOWdetail.- 参数:
url- the url of the image.
-
ImageContent
Create a newImageContentfrom the given url.The image will be created with
DetailLevel.LOWdetail.- 参数:
url- the url of the image.
-
ImageContent
Create a newImageContentfrom the given url and detail level.- 参数:
url- the url of the image.detailLevel- the detail level of the image.
-
ImageContent
Create a newImageContentfrom the given url and detail level.- 参数:
url- the url of the image.detailLevel- the detail level of the image.
-
ImageContent
Create a newImageContentfrom the given base64 data and mime type.The image will be created with
DetailLevel.LOWdetail.- 参数:
base64Data- the base64 data of the image.mimeType- the mime type of the image.
-
ImageContent
Create a newImageContentfrom 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
Create a newImageContentfrom the given image.The image will be created with
DetailLevel.LOWdetail.- 参数:
image- the image.
-
ImageContent
Create a newImageContentfrom the given image.- 参数:
image- the image.detailLevel- the detail level of the image.
-
-
方法详细资料
-
image
Get theImage.- 返回:
- the
Image.
-
detailLevel
Get theDetailLevel.- 返回:
- the
DetailLevel.
-
type
从接口复制的说明:ContentReturns the type of content.Can be used to cast the content to the correct type.
-
equals
-
hashCode
public int hashCode() -
toString
-
from
Create a newImageContentfrom the given url.The image will be created with
DetailLevel.LOWdetail.- 参数:
url- the url of the image.- 返回:
- the new
ImageContent.
-
from
Create a newImageContentfrom the given url.The image will be created with
DetailLevel.LOWdetail.- 参数:
url- the url of the image.- 返回:
- the new
ImageContent.
-
from
Create a newImageContentfrom the given url and detail level.- 参数:
url- the url of the image.detailLevel- the detail level of the image.- 返回:
- the new
ImageContent.
-
from
Create a newImageContentfrom the given url and detail level.- 参数:
url- the url of the image.detailLevel- the detail level of the image.- 返回:
- the new
ImageContent.
-
from
Create a newImageContentfrom the given base64 data and mime type.The image will be created with
DetailLevel.LOWdetail.- 参数:
base64Data- the base64 data of the image.mimeType- the mime type of the image.- 返回:
- the new
ImageContent.
-
from
public static ImageContent from(String base64Data, String mimeType, ImageContent.DetailLevel detailLevel) Create a newImageContentfrom 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.- 返回:
- the new
ImageContent.
-
from
Create a newImageContentfrom the given image.The image will be created with
DetailLevel.LOWdetail.- 参数:
image- the image.- 返回:
- the new
ImageContent.
-
from
Create a newImageContentfrom the given image.- 参数:
image- the image.detailLevel- the detail level of the image.- 返回:
- the new
ImageContent.
-