AS AgentScopeAPI 手册 / API Reference

ImageBlockParser

public class ImageBlockParser extends BaseMediaBlockParser<ImageBlock>
源码Source io/agentscope/core/a2a/agent/message/ImageBlockParser.java:25–36

用于ImageBlock到io.a2a.spec.FilePart的解析器。位于 io.agentscope.core.a2a.agent.message 包,继承自 BaseMediaBlockParser<ImageBlock>。核心成员包括 getMediaType、parse。

Parser for ImageBlock to io.a2a.spec.FilePart.

方法摘要Method Summary

方法Method说明Description
protected String getMediaType()
获取 `getMediaType`。
Returns the media type.
public Part<?> parse(ImageBlock contentBlock)
设置解析。
Performs the parse operation.

方法详情Method Detail

getMediaType

protected String getMediaType()

获取 getMediaType。

Returns the media type.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/a2a/agent/message/ImageBlockParser.java:27–30

parse

public Part<?> parse(ImageBlock contentBlock)

设置解析。

Performs the parse operation.

参数Parameters
名称Name类型Type说明Description
contentBlockImageBlock内容块(类型 `ImageBlock`)。The content block.
返回Returns Part<?>
返回片段。Returns part.
源码Source io/agentscope/core/a2a/agent/message/ImageBlockParser.java:32–35
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.