TaskCompletionCallback
@FunctionalInterface interface TaskCompletionCallback
源码Source
io/agentscope/harness/agent/subagent/task/TaskRepository.java:152–160定义任务补全回调契约的接口。位于 io.agentscope.harness.agent.subagent.task 包。核心成员包括 onCompleted。
Callback invoked when a background task reaches a terminal state (COMPLETED or FAILED).
result is null when the task failed.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void onCompleted(RuntimeContext rc, String taskId, String subAgentId, String sessionId, String result) | 处理已完成事件。 Performs the on completed operation. |
方法详情Method Detail
onCompleted
public void onCompleted(RuntimeContext rc, String taskId, String subAgentId, String sessionId, String result)
处理已完成事件。
Performs the on completed operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
rc | RuntimeContext | rc(类型 `RuntimeContext`)。The rc. |
taskId | String | 任务标识(类型 `String`)。The task id. |
subAgentId | String | 子智能体标识(类型 `String`)。The sub agent id. |
sessionId | String | 会话标识(类型 `String`)。The session id. |
result | String | 结果(类型 `String`)。The result. |
源码Source
io/agentscope/harness/agent/subagent/task/TaskRepository.java:154–159