- 新增同会话+同工作流最近执行失败且参数一致时断点续跑逻辑 - exec_workflow/exec_chat 新增 error 字段存储原始错误,error_message 仅存友好提示 - 新增 UpdateExecChatReq 与 exec_chat_dao Update 方法 - 新增 GetLatestBySessionAndFlow 查询最近执行记录 - 修正 ListDates 分组与排序 SQL 表达式 - 新增 pipeline 配置结构,删除旧设计文档
32 lines
1.7 KiB
Go
32 lines
1.7 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:"错误明细(原始错误)"`
|
|
}
|
|
|
|
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:"错误明细(原始错误)"`
|
|
}
|