feat: 将节点输入输出参数上传至OSS存储

This commit is contained in:
2026-06-12 11:02:36 +08:00
parent ddc4e0be63
commit fba7d032ae
4 changed files with 52 additions and 17 deletions

View File

@@ -11,13 +11,16 @@ import (
// CreateNodeExecutionReq 创建节点执行记录请求
type CreateNodeExecutionReq struct {
g.Meta `path:"/create" method:"post" tags:"节点执行记录" summary:"创建节点执行记录" dc:"创建节点执行记录"`
FlowExecutionId int64 `json:"flowExecutionId" v:"required#流程执行ID不能为空"`
NodeId string `json:"nodeId" v:"required#节点ID不能为空"`
NodeName string `json:"nodeName"`
NodeGroupId string `json:"nodeGroupId"`
Status node.NodeExecutionStatus `json:"status"`
InputParams *flowDto.NodeExecutionInput `json:"inputParams"`
g.Meta `path:"/create" method:"post" tags:"节点执行记录" summary:"创建节点执行记录" dc:"创建节点执行记录"`
FlowExecutionId int64 `json:"flowExecutionId" v:"required#流程执行ID不能为空"`
NodeId string `json:"nodeId" v:"required#节点ID不能为空"`
NodeName string `json:"nodeName"`
NodeGroupId string `json:"nodeGroupId"`
Status node.NodeExecutionStatus `json:"status"`
InputParams *flowDto.NodeExecutionInput `json:"inputParams"`
InputParamsPath string
OutputParams *flowDto.NodeExecutionInput `json:"outputParams"`
OutputParamsPath string
}
type CreateNodeExecutionRes struct {
@@ -29,12 +32,15 @@ type UpdateNodeExecutionReq struct {
g.Meta `path:"/update" method:"put" tags:"节点执行记录" summary:"更新节点执行记录" dc:"更新节点执行记录状态和结果"`
Id int64 `json:"id" v:"required#ID不能为空"`
InputParams *flowDto.NodeExecutionInput `json:"inputParams"`
PromptTokens int `json:"promptTokens"`
CompletionTokens int `json:"completionTokens"`
TotalTokens int `json:"totalTokens"`
Status node.NodeExecutionStatus `json:"status"`
DurationMs int64 `json:"durationMs"`
ErrorMessage string `json:"errorMessage"`
InputParamsPath string
OutputParams *flowDto.NodeExecutionInput `json:"outputParams"`
OutputParamsPath string
PromptTokens int `json:"promptTokens"`
CompletionTokens int `json:"completionTokens"`
TotalTokens int `json:"totalTokens"`
Status node.NodeExecutionStatus `json:"status"`
DurationMs int64 `json:"durationMs"`
ErrorMessage string `json:"errorMessage"`
}
// DeleteNodeExecutionReq 删除节点执行记录请求