34 lines
1.9 KiB
Go
34 lines
1.9 KiB
Go
package session
|
|
|
|
import (
|
|
"ai-agent/workflow/consts/flow"
|
|
"ai-agent/workflow/model/entity"
|
|
)
|
|
|
|
type CreateWorkflowReq struct {
|
|
SessionId string `json:"sessionId" description:"所属会话ID"`
|
|
FlowId int64 `json:"flowId" description:"工作流ID"`
|
|
NodeGroupId string `json:"nodeGroupId" description:"节点组ID"`
|
|
Status flow.FlowExecutionStatus `json:"status" description:"状态:1-运行中,2-成功,3-失败"`
|
|
RequestParams *entity.FlowInfo `json:"requestParams" description:"请求参数"`
|
|
ErrorMessage string `json:"errorMessage" description:"错误信息(友好提示)"`
|
|
Error string `json:"error" description:"错误明细(原始错误)"`
|
|
LastHeartbeat int64 `json:"lastHeartbeat" description:"最后心跳时间(毫秒时间戳)"`
|
|
}
|
|
|
|
type DeleteExecWorkflowReq struct {
|
|
Id []int64 `json:"id" v:"required#工作流执行记录ID不能为空"`
|
|
}
|
|
|
|
type UpdateWorkflowReq struct {
|
|
Id int64 `json:"id" v:"required#工作流执行记录ID不能为空"`
|
|
NodeGroupId string `json:"nodeGroupId" description:"节点组ID"`
|
|
Status flow.FlowExecutionStatus `json:"status" description:"状态:1-运行中,2-成功,3-失败"`
|
|
Duration int64 `json:"duration" description:"执行时长(秒)"`
|
|
TotalTokens int `json:"totalTokens" description:"总token消耗"`
|
|
TotalFee float64 `json:"totalFee" description:"总费用"`
|
|
ErrorMessage string `json:"errorMessage" description:"错误信息(友好提示)"`
|
|
Error string `json:"error" description:"错误明细(原始错误)"`
|
|
RequestParams *entity.FlowInfo `json:"requestParams" description:"请求参数"`
|
|
}
|