AguiAgentRegistryCustomizer
@FunctionalInterface public interface AguiAgentRegistryCustomizer extends Consumer<AguiAgentRegistry>
源码Source
io/agentscope/spring/boot/agui/common/AguiAgentRegistryCustomizer.java:38–55定义 AGUI 智能体注册表 Customizer契约的接口。位于 io.agentscope.spring.boot.agui.common 包,实现 Consumer<AguiAgentRegistry>。核心成员包括 customize、accept。
Customizer for AguiAgentRegistry.
Example usage:
` public AguiAgentRegistryCustomizer aguiAgentRegistryCustomizer() {
AguiAgentRegistryCustomizer aguiAgentRegistryCustomizer = new AguiAgentRegistryCustomizer() {
@Override
public void customize(AguiAgentRegistry registry) {
registry.registerFactory("chat", () -> createChatAgent());
}
};
return aguiAgentRegistryCustomizer;
}
`
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void customize(AguiAgentRegistry registry) | 设置该参数。 Customize the `AguiAgentRegistry`. |
default public void accept(AguiAgentRegistry registry)default | 设置该参数。 Accept and invoke the given agent registry. |
方法详情Method Detail
customize
public void customize(AguiAgentRegistry registry)
设置该参数。
Customize the AguiAgentRegistry.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
registry | AguiAgentRegistry | 注册表(类型 `AguiAgentRegistry`)。the registry to customize |
源码Source
io/agentscope/spring/boot/agui/common/AguiAgentRegistryCustomizer.java:46accept
default public void accept(AguiAgentRegistry registry)
default
设置该参数。
Accept and invoke the given agent registry.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
registry | AguiAgentRegistry | 智能体注册表。the agent registry |
源码Source
io/agentscope/spring/boot/agui/common/AguiAgentRegistryCustomizer.java:52–54