类 ImageBlock
java.lang.Object
io.agentscope.core.message.ContentBlock
io.agentscope.core.message.ImageBlock
- 所有已实现的接口:
State
Represents image content in a message with URL or Base64 source.
This content block supports images from two sources:
- URL source - images accessible via HTTP/HTTPS URLs or local file URLs
- Base64 source - images encoded as Base64 strings with MIME type
Image blocks are essential for multimodal AI interactions where agents need to process visual information from images, diagrams, screenshots, or other visual content.
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static ImageBlock.Builderbuilder()Creates a new builder for constructing ImageBlock instances.Gets the maximum pixel threshold for input image.Gets the minimum pixel threshold for input image.Gets the source of this image.
-
构造器详细资料
-
ImageBlock
Creates a new image block with source.- 参数:
source- The image source (URL or Base64)- 抛出:
NullPointerException- if source is null
-
-
方法详细资料
-
getSource
Gets the source of this image.- 返回:
- The image source containing URL or Base64 data
-
getMinPixels
Gets the minimum pixel threshold for input image.- 返回:
- The minimum pixel threshold
-
getMaxPixels
Gets the maximum pixel threshold for input image.- 返回:
- The maximum pixel threshold
-
builder
Creates a new builder for constructing ImageBlock instances.- 返回:
- A new builder instance
-