feat: 将节点输入输出参数上传至OSS存储
This commit is contained in:
@@ -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 删除节点执行记录请求
|
||||
|
||||
@@ -16,7 +16,9 @@ type NodeExecution struct {
|
||||
NodeName string `orm:"node_name" json:"nodeName" description:"节点名称"`
|
||||
NodeGroupId string `orm:"node_group_id" json:"nodeGroupId" description:"节点组ID"`
|
||||
InputParams map[string]interface{} `orm:"input_params" json:"inputParams" description:"节点输入参数"`
|
||||
InputParamsPath string `orm:"input_params_path" json:"inputParamsPath" description:"节点输入参数路径"`
|
||||
OutputParams map[string]interface{} `orm:"output_params" json:"outputParams" description:"节点输出参数"`
|
||||
OutputParamsPath string `orm:"output_params_path" json:"outputParamsPath" description:"节点输出参数路径"`
|
||||
PromptTokens int `orm:"prompt_tokens" json:"promptTokens" description:"提示词token消耗"`
|
||||
CompletionTokens int `orm:"completion_tokens" json:"completionTokens" description:"补全token消耗"`
|
||||
TotalTokens int `orm:"total_tokens" json:"totalTokens" description:"总token消耗"`
|
||||
@@ -32,7 +34,9 @@ type nodeExecutionCol struct {
|
||||
NodeName string
|
||||
NodeGroupId string
|
||||
InputParams string
|
||||
InputParamsPath string
|
||||
OutputParams string
|
||||
OutputParamsPath string
|
||||
PromptTokens string
|
||||
CompletionTokens string
|
||||
TotalTokens string
|
||||
@@ -48,7 +52,9 @@ var NodeExecutionCol = nodeExecutionCol{
|
||||
NodeName: "node_name",
|
||||
NodeGroupId: "node_group_id",
|
||||
InputParams: "input_params",
|
||||
InputParamsPath: "input_params_path",
|
||||
OutputParams: "output_params",
|
||||
OutputParamsPath: "output_params_path",
|
||||
PromptTokens: "prompt_tokens",
|
||||
CompletionTokens: "completion_tokens",
|
||||
TotalTokens: "total_tokens",
|
||||
|
||||
Reference in New Issue
Block a user