ContentBlockParser
public interface ContentBlockParser<T extends ContentBlock>
源码Source
io/agentscope/core/a2a/agent/message/ContentBlockParser.java:25–34定义内容块解析器契约的接口。位于 io.agentscope.core.a2a.agent.message 包。核心成员包括 parse。
ContentBlock parser interface, used to parse ContentBlock and convert to Part .
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Part<?> parse(T contentBlock) | 设置解析。 Parse the given ContentBlock and convert it to a Part. |
方法详情Method Detail
parse
public Part<?> parse(T contentBlock)
设置解析。
Parse the given ContentBlock and convert it to a Part.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
contentBlock | T | 内容块(类型 `T`)。the content block to parse, not null |
Part<?>已解析片段。the parsed part
源码Source
io/agentscope/core/a2a/agent/message/ContentBlockParser.java:33