CopilotKitRuntimeService
@Service public final class CopilotKitRuntimeService
源码Source
io/agentscope/examples/copilotkit/service/CopilotKitRuntimeService.java:39–136CopilotKit 运行时服务,把智能体接入外部消息渠道与企业平台。位于 io.agentscope.examples.copilotkit.service 包。核心成员包括 info、connect、CopilotKitRuntimeService。
CopilotKit Runtime info and multi-route connect handshake with AgentEvent replay.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public CopilotKitRuntimeService(AguiAgentRegistry aguiAgentRegistry, AgentEventAguiReplayer eventReplayer) | 初始化 `CopilotKitRuntimeService` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public InfoResponse info() | 返回信息。 Returns the info. |
public Flux<ServerSentEvent<String>> connect(RunAgentInput input) | 建立连接并完成初始化。 AG-UI connect: replay persisted AgentEvents through converters, or emit an empty handshake. |
构造器详情Constructor Detail
CopilotKitRuntimeService
public CopilotKitRuntimeService(AguiAgentRegistry aguiAgentRegistry, AgentEventAguiReplayer eventReplayer)
初始化 CopilotKitRuntimeService 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
aguiAgentRegistry | AguiAgentRegistry | AGUI 智能体注册表(类型 `AguiAgentRegistry`)。The agui agent registry. |
eventReplayer | AgentEventAguiReplayer | 事件 Replayer(类型 `AgentEventAguiReplayer`)。The event replayer. |
源码Source
io/agentscope/examples/copilotkit/service/CopilotKitRuntimeService.java:53–57方法详情Method Detail
info
public InfoResponse info()
返回信息。
Returns the info.
InfoResponse返回InfoResponse。Returns info response.
源码Source
io/agentscope/examples/copilotkit/service/CopilotKitRuntimeService.java:59–86connect
public Flux<ServerSentEvent<String>> connect(RunAgentInput input)
建立连接并完成初始化。
AG-UI connect: replay persisted AgentEvents through converters, or emit an empty handshake.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
input | RunAgentInput | 输入消息(类型 `RunAgentInput`)。The input. |
Flux<ServerSentEvent<String>>返回Flux>。Returns flux.
源码Source
io/agentscope/examples/copilotkit/service/CopilotKitRuntimeService.java:115–123