- 新增 ActivePull 实体、DAO、DTO 及 Service,支持主动拉取任务管理 - 新增 ComposeCallback、VideoCallback、HttpNodeCallback 多类型回调接口 - FlowExecution 增加 NodeGroupId 和 TotalTokens 字段,支持节点组追踪与 Token 统计 - ExecutedNodes 结构由字符串列表改为包含执行状态的节点对象列表 - 重构回调通知机制,统一 Notify 函数调用 - 优化输出项类型判断逻辑,新增文件类型标识
24 lines
518 B
Go
24 lines
518 B
Go
package flow
|
|
|
|
import (
|
|
flowService "ai-agent/workflow/service/flow"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
"github.com/gogf/gf/v2/net/ghttp"
|
|
)
|
|
|
|
type flowCallBack struct{}
|
|
|
|
var FlowCallBack = new(flowCallBack)
|
|
|
|
func (c *flowCallBack) HttpNodeCallback(r *ghttp.Request) {
|
|
ctx := r.Context()
|
|
err := flowService.FlowExecutionService.HttpNodeCallback(ctx)
|
|
if err != nil {
|
|
r.Response.WriteJson(g.Map{"code": 500, "message": err.Error()})
|
|
return
|
|
}
|
|
r.Response.WriteJson(g.Map{"code": 0, "message": "success"})
|
|
return
|
|
}
|