AgentCardConverterUtil
public class AgentCardConverterUtil
源码Source
io/agentscope/extensions/nacos/a2a/utils/AgentCardConverterUtil.java:38–208智能体卡片转换器 Util,支持智能体之间的发现、委派与协作。位于 io.agentscope.extensions.nacos.a2a.utils 包。核心成员包括 convertToA2aAgentCard、convertToNacosAgentCard。
AgentCard Converter between Nacos com.alibaba.nacos.api.ai.model.a2a.AgentCard and A2A specification
io.a2a.spec.AgentCard.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static io.a2a.spec.AgentCard convertToA2aAgentCard(AgentCard agentCard)static | 转换到 A 2 a 智能体卡片。 Convert Nacos AgentCard object to A2A specification AgentCard object |
public static AgentCard convertToNacosAgentCard(io.a2a.spec.AgentCard agentCard)static | 转换 `convertToNacosAgentCard`。 Convert A2A specification AgentCard object to Nacos AgentCard object |
方法详情Method Detail
convertToA2aAgentCard
public static io.a2a.spec.AgentCard convertToA2aAgentCard(AgentCard agentCard)
static
转换到 A 2 a 智能体卡片。
Convert Nacos AgentCard object to A2A specification AgentCard object
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentCard | AgentCard | 智能体卡片(类型 `AgentCard`)。the Nacos AgentCard object |
io.a2a.spec.AgentCard返回io.A2A.规格.AgentCard。the converted A2A specification AgentCard object, or null if input is null
源码Source
io/agentscope/extensions/nacos/a2a/utils/AgentCardConverterUtil.java:46–65convertToNacosAgentCard
public static AgentCard convertToNacosAgentCard(io.a2a.spec.AgentCard agentCard)
static
转换 convertToNacosAgentCard。
Convert A2A specification AgentCard object to Nacos AgentCard object
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentCard | io.a2a.spec.AgentCard | 智能体卡片(类型 `io.a2a.spec.AgentCard`)。the A2A specification AgentCard object |
AgentCard返回AgentCard。the converted Nacos AgentCard object
源码Source
io/agentscope/extensions/nacos/a2a/utils/AgentCardConverterUtil.java:130–150