VideoBlock
@JsonInclude(JsonInclude.Include.NON_NULL) public final class VideoBlock extends ContentBlock
io/agentscope/core/message/VideoBlock.java:35–239表示视频内容 in 消息。位于 io.agentscope.core.message 包,继承自 ContentBlock。核心成员包括 getSource、getFps、getMaxFrames、getMinPixels、getMaxPixels、getTotalPixels。
Represents video content in a message.
This content block supports video from two sources:
-
URL source - video files accessible via HTTP/HTTPS URLs or local file URLs
-
Base64 source - video encoded as Base64 strings with MIME type
Video blocks enable advanced multimodal AI interactions where agents need to process or analyze video content such as presentations, tutorials, surveillance footage, or other visual media that includes motion and temporal elements.
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Builder | 类class | 构建器,用于构建并配置目标实例。 Builder for constructing VideoBlock instances. |
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public VideoBlock(Source source) | 创建新的视频块使用来源。 Creates a new video block with source. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Source getSource() | 获取来源的此视频内容。 Gets the source of this video content. |
public Float getFps() | 获取 `getFps`。 Gets the frames per second (FPS) of the video. |
public Integer getMaxFrames() | 获取 `getMaxFrames`。 Gets the maximum number of frames to capture from the video. |
public Integer getMinPixels() | 获取 `getMinPixels`。 Gets the minimum pixel threshold for input video frames. |
public Integer getMaxPixels() | 获取 `getMaxPixels`。 Gets the maximum pixel threshold for input video frames. |
public Integer getTotalPixels() | 获取 `getTotalPixels`。 Gets the total pixels of all frames extracted from the video (single image pixels × total frames). |
public static Builder builder()static | 返回构建器实例。 Creates a new builder for constructing VideoBlock instances. |
构造器详情Constructor Detail
VideoBlock
public VideoBlock(Source source)
创建新的视频块使用来源。
Creates a new video block with source.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
source | Source | 视频来源(URL 或 Base64)。The video source (URL or Base64) |
io/agentscope/core/message/VideoBlock.java:55–57方法详情Method Detail
getSource
public Source getSource()
获取来源的此视频内容。
Gets the source of this video content.
Sourceio/agentscope/core/message/VideoBlock.java:90–92getFps
public Float getFps()
获取 getFps。
Gets the frames per second (FPS) of the video.
Floatio/agentscope/core/message/VideoBlock.java:99–101getMaxFrames
public Integer getMaxFrames()
获取 getMaxFrames。
Gets the maximum number of frames to capture from the video.
Integerio/agentscope/core/message/VideoBlock.java:108–110getMinPixels
public Integer getMinPixels()
获取 getMinPixels。
Gets the minimum pixel threshold for input video frames.
Integerio/agentscope/core/message/VideoBlock.java:117–119getMaxPixels
public Integer getMaxPixels()
获取 getMaxPixels。
Gets the maximum pixel threshold for input video frames.
Integerio/agentscope/core/message/VideoBlock.java:126–128getTotalPixels
public Integer getTotalPixels()
获取 getTotalPixels。
Gets the total pixels of all frames extracted from the video (single image pixels × total frames).
Integerio/agentscope/core/message/VideoBlock.java:134–136builder
public static Builder builder()
返回构建器实例。
Creates a new builder for constructing VideoBlock instances.
Builderio/agentscope/core/message/VideoBlock.java:143–145嵌套类详情Nested Class Detail
Builder
public static class Builder构建器,用于构建并配置目标实例。位于 io.agentscope.core.message 包。核心成员包括 source、fps、maxFrames、minPixels、maxPixels、totalPixels。
Builder for constructing VideoBlock instances.