- 新增同会话+同工作流最近执行失败且参数一致时断点续跑逻辑 - exec_workflow/exec_chat 新增 error 字段存储原始错误,error_message 仅存友好提示 - 新增 UpdateExecChatReq 与 exec_chat_dao Update 方法 - 新增 GetLatestBySessionAndFlow 查询最近执行记录 - 修正 ListDates 分组与排序 SQL 表达式 - 新增 pipeline 配置结构,删除旧设计文档
45 lines
1.6 KiB
Go
45 lines
1.6 KiB
Go
package entity
|
|
|
|
import "gitea.redpowerfuture.com/red-future/common/beans"
|
|
|
|
// ExecChat 执行会话
|
|
type ExecChat struct {
|
|
beans.SQLBaseDO `orm:",inherit"`
|
|
SessionId string `orm:"session_id" json:"sessionId" description:"会话ID"`
|
|
Duration int64 `orm:"duration" json:"duration" description:"执行时长(秒)"`
|
|
RequestParams ExecChatRequestParams `orm:"request_params" json:"requestParams" description:"请求参数"`
|
|
ResultFileUrl string `orm:"result_file_url" json:"resultFileUrl" description:"结果文件路径"`
|
|
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:"错误信息(友好提示)"`
|
|
Error string `orm:"error" json:"error" description:"错误明细(原始错误)"`
|
|
}
|
|
|
|
type ExecChatRequestParams struct {
|
|
Question string `json:"question"`
|
|
}
|
|
|
|
type execChatCol struct {
|
|
beans.SQLBaseCol
|
|
SessionId string
|
|
Duration string
|
|
RequestParams string
|
|
ResultFileUrl string
|
|
TotalTokens string
|
|
TotalFee string
|
|
ErrorMessage string
|
|
Error string
|
|
}
|
|
|
|
var ExecChatCol = execChatCol{
|
|
SQLBaseCol: beans.DefSQLBaseCol,
|
|
SessionId: "session_id",
|
|
Duration: "duration",
|
|
RequestParams: "request_params",
|
|
ResultFileUrl: "result_file_url",
|
|
TotalTokens: "total_tokens",
|
|
TotalFee: "total_fee",
|
|
ErrorMessage: "error_message",
|
|
Error: "error",
|
|
}
|