feat: 新增主动拉取与多类型回调功能
- 新增 ActivePull 实体、DAO、DTO 及 Service,支持主动拉取任务管理 - 新增 ComposeCallback、VideoCallback、HttpNodeCallback 多类型回调接口 - FlowExecution 增加 NodeGroupId 和 TotalTokens 字段,支持节点组追踪与 Token 统计 - ExecutedNodes 结构由字符串列表改为包含执行状态的节点对象列表 - 重构回调通知机制,统一 Notify 函数调用 - 优化输出项类型判断逻辑,新增文件类型标识
This commit is contained in:
54
workflow/model/dto/pull/active_pull_dto.go
Normal file
54
workflow/model/dto/pull/active_pull_dto.go
Normal file
@@ -0,0 +1,54 @@
|
||||
package pull
|
||||
|
||||
import (
|
||||
"ai-agent/workflow/consts/flow"
|
||||
"ai-agent/workflow/model/entity"
|
||||
|
||||
"gitea.com/red-future/common/beans"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
type CreateActivePullReq struct {
|
||||
Type string `json:"type"`
|
||||
RequestParament map[string]any `json:"requestParament"`
|
||||
ResponseParament map[string]any `json:"responseParament"`
|
||||
Extension map[string]any `json:"extension"`
|
||||
}
|
||||
|
||||
type CreateActivePullRes struct {
|
||||
Id int64 `json:"id,string"`
|
||||
}
|
||||
|
||||
type UpdateActivePullReq struct {
|
||||
Id int64 `json:"id" v:"required#ID不能为空"`
|
||||
Type string `json:"type"`
|
||||
RequestParament map[string]any `json:"requestParament"`
|
||||
ResponseParament map[string]any `json:"responseParament"`
|
||||
Extension map[string]any `json:"extension"`
|
||||
}
|
||||
|
||||
type DeleteActivePullReq struct {
|
||||
Id int64 `json:"id" v:"required#ID不能为空"`
|
||||
}
|
||||
|
||||
type ListActivePullReq struct {
|
||||
Page *beans.Page `json:"page"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
type ListActivePullRes struct {
|
||||
List []*ActivePullVO `json:"list"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
type ActivePullVO struct {
|
||||
Id int64 `json:"id,string" dc:"id"`
|
||||
FlowName string `json:"flowName" description:"流程名称"`
|
||||
Description string `json:"description" description:"流程描述"`
|
||||
FlowContent *entity.FlowInfo `json:"flowContent" description:"流程内容"`
|
||||
NodeInputParams []*entity.FlowNode `json:"nodeInputParams" description:"节点输入参数"`
|
||||
AccessLevel flow.FlowUserAccessLevel `json:"accessLevel" description:"访问权限:1私有,2团队,3公开"`
|
||||
SourceFlowTemplateId int64 `json:"sourceFlowTemplateId,string" description:"来源流程模板ID"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
||||
}
|
||||
Reference in New Issue
Block a user