48 lines
1.7 KiB
Go
48 lines
1.7 KiB
Go
package entity
|
|
|
|
import (
|
|
"ai-agent/workflow/consts/flow"
|
|
|
|
"gitea.redpowerfuture.com/red-future/common/beans"
|
|
)
|
|
|
|
// ExecWorkflow 执行工作流
|
|
type ExecWorkflow struct {
|
|
beans.SQLBaseDO `orm:",inherit"`
|
|
SessionId string `orm:"session_id" json:"sessionId" description:"会话ID"`
|
|
FlowId int64 `orm:"flow_id" json:"flowId" description:"工作流ID"`
|
|
NodeGroupId string `orm:"node_group_id" json:"nodeGroupId" description:"节点组ID"`
|
|
Duration int64 `orm:"duration" json:"duration" description:"执行时长(秒)"`
|
|
RequestParams *FlowInfo `orm:"request_params" json:"requestParams" description:"请求参数"`
|
|
Status flow.FlowExecutionStatus `orm:"status" json:"status" description:"状态:1-运行中,2-成功,3-失败"`
|
|
TotalTokens int `orm:"total_tokens" json:"totalTokens" description:"总token消耗"`
|
|
TotalFee float64 `orm:"total_fee" json:"totalFee" description:"总费用"`
|
|
ErrorMessage string `orm:"error_message" json:"errorMessage" description:"错误信息"`
|
|
}
|
|
|
|
type execWorkflowCol struct {
|
|
beans.SQLBaseCol
|
|
SessionId string
|
|
FlowId string
|
|
NodeGroupId string
|
|
Duration string
|
|
RequestParams string
|
|
Status string
|
|
TotalTokens string
|
|
TotalFee string
|
|
ErrorMessage string
|
|
}
|
|
|
|
var ExecWorkflowCol = execWorkflowCol{
|
|
SQLBaseCol: beans.DefSQLBaseCol,
|
|
SessionId: "session_id",
|
|
FlowId: "flow_id",
|
|
NodeGroupId: "node_group_id",
|
|
Duration: "duration",
|
|
RequestParams: "request_params",
|
|
Status: "status",
|
|
TotalTokens: "total_tokens",
|
|
TotalFee: "total_fee",
|
|
ErrorMessage: "error_message",
|
|
}
|