Files
model-gateway/model/dto/model_task_start_dto.go
T
19904408334 76c55fbb73 feat: 新增业务字段路径读写工具
新增 TakeBusinessFields、WriteBusinessFields、SetByPath 与 GetByPath 等工具,支持按映射路径写入请求体与解析响应,并更新相关依赖。
2026-08-18 10:11:09 +08:00

47 lines
1.9 KiB
Go

package dto
import (
"model-gateway/model/entity"
"gitea.redpowerfuture.com/red-future/common/beans"
)
type CallModelTaskStartReq struct {
Id int64 `json:"id" v:"required#id不能为空" dc:"任务ID"`
ModelInfo *entity.ModelManage `json:"modelInfo" dc:"模型信息"`
RequestParams map[string]any `json:"requestParams" dc:"新请求参数"`
}
// CreateModelTaskStartReq 创建任务
type CreateModelTaskStartReq struct {
ModelId int64 `json:"modelId" dc:"模型ID"`
BizName string `json:"bizName" dc:"业务名称(调用方模块/系统,用于统计)"`
MsgTopic string `json:"msgTopic" dc:"消息主题(可选,用于后续业务通知)"`
RequestPath string `json:"requestPath" dc:"请求参数保存路径"`
OriginalRequestPath string `json:"originalRequestPath" dc:"原始请求参数保存路径"`
MediaType string `json:"mediaType" dc:"输入媒体类型快照(audio/no_video/has_video,创建任务时按请求体推导)"`
}
type CreateModelTaskStartRes struct {
Id int64 `json:"id" dc:"任务ID"`
}
// UpdateModelTaskStartReq 修改任务
type UpdateModelTaskStartReq struct {
Id int64 `json:"id" v:"required#id不能为空" dc:"任务ID"`
RetryCount int `json:"retryCount" dc:"重试"`
ResponseParams map[string]any `json:"responseParams" dc:"响应结果"`
OriginalResponseParams map[string]any `json:"originalResponseParams" dc:"原始响应结果"`
TaskId string `json:"taskId" dc:"任务ID"`
DurationSeconds int64 `json:"durationSeconds" dc:"耗时(秒)"`
ErrorMsg string `json:"errorMsg" dc:"错误消息"`
}
type DeleteModelTaskStartReq struct {
Id int64 `json:"id" v:"required#ids不能为空" dc:"任务ID"`
}
type GetModelTaskStartListReq struct {
Page *beans.Page `json:"page"`
}