2026-05-20 11:36:39 +08:00
|
|
|
|
package dto
|
2026-05-12 13:59:15 +08:00
|
|
|
|
|
|
|
|
|
|
import "github.com/gogf/gf/v2/frame/g"
|
|
|
|
|
|
|
|
|
|
|
|
type ComposeMessagesReq struct {
|
2026-05-22 09:49:46 +08:00
|
|
|
|
g.Meta `path:"/composeMessages" method:"post" tags:"提示词处理" summary:"拼接提示词" dc:"按 modelTypeId 读取 prompts_model_prompt.prompt_info 与 response_json_schema;form 作为系统表单,userForm 作为用户表单,结合 userFiles 调用 model-gateway,并直接返回最终 messages"`
|
|
|
|
|
|
ModelName string `p:"modelName" json:"modelName" v:"required#modelName不能为空" dc:"实际请求的网关模型名称"`
|
|
|
|
|
|
BuildType int `p:"buildType" json:"buildType" v:"required#buildType不能为空" dc:"构建类型"` //判断节点
|
|
|
|
|
|
SessionId string `p:"sessionId" json:"sessionId" v:"required#sessionId不能为空" dc:"会话ID"`
|
|
|
|
|
|
Cause string `p:"cause" json:"cause" v:"required-if:IsBuilder,false#原因不能为空" dc:"原因"`
|
|
|
|
|
|
CallbackUrl string `p:"callbackUrl" json:"callbackUrl" dc:"回调地址"`
|
|
|
|
|
|
Form map[string]any `p:"form" json:"form" dc:"系统表单:form 下所有字段都作为系统提示词来源"`
|
|
|
|
|
|
UserForm []map[string]any `p:"userForm" json:"userForm" dc:"用户表单:userForm 下所有字段都作为用户提示词来源;若与 form 含义接近则严格覆盖系统字段"`
|
|
|
|
|
|
SkillName string `p:"skillName" json:"skillName" dc:"技能名称"`
|
|
|
|
|
|
UserFiles []string `p:"userFiles" json:"userFiles" dc:"用户附件地址列表"`
|
2026-05-12 13:59:15 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type ComposeMessagesRes struct {
|
2026-05-22 09:49:46 +08:00
|
|
|
|
TaskId string `json:"taskId" dc:"任务ID"`
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2026-05-20 11:36:39 +08:00
|
|
|
|
Messages *MultiRoundResult `json:"messages,omitempty" dc:"最终消息数组"`
|
|
|
|
|
|
EpicycleId int64 `json:"epicycleId" dc:"轮次ID"`
|
2026-05-22 09:49:46 +08:00
|
|
|
|
*/
|
2026-05-20 11:36:39 +08:00
|
|
|
|
|
|
|
|
|
|
// MultiRoundResult 多轮返回结果
|
|
|
|
|
|
type MultiRoundResult struct {
|
2026-05-21 14:23:34 +08:00
|
|
|
|
TotalRounds int `json:"total_rounds"` // 总轮数
|
|
|
|
|
|
Rounds []map[string]any `json:"rounds"` // 每轮详情(动态类型)
|
2026-05-12 13:59:15 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type CallbackReq struct {
|
|
|
|
|
|
g.Meta `path:"/callback" method:"post" tags:"提示词处理" summary:"model-gateway 回调" dc:"model-gateway 成功后 POST 回调:callbackUrl/{bizName}"`
|
|
|
|
|
|
TaskId string `json:"task_id" v:"required#task_id不能为空" dc:"网关任务ID"`
|
|
|
|
|
|
State int `json:"state" dc:"网关任务状态"`
|
|
|
|
|
|
OssFile string `json:"oss_file" dc:"结果文件地址"`
|
|
|
|
|
|
FileType string `json:"file_type" dc:"结果文件类型"`
|
|
|
|
|
|
Text string `json:"text" dc:"文本结果"`
|
|
|
|
|
|
ErrorMsg string `json:"error_msg" dc:"错误信息"`
|
|
|
|
|
|
EpicycleId int64 `json:"epicycleId" dc:"轮次ID"`
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-18 19:19:17 +08:00
|
|
|
|
type CallbackRes struct {
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-12 13:59:15 +08:00
|
|
|
|
type GetComposeTaskReq struct {
|
|
|
|
|
|
g.Meta `path:"/getComposeTask" method:"get" tags:"提示词处理" summary:"查询拼接任务" dc:"按 taskId 查询提示词拼接任务结果"`
|
|
|
|
|
|
TaskId string `p:"taskId" json:"taskId" v:"required#taskId不能为空" dc:"任务ID"`
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type GetComposeTaskRes struct {
|
|
|
|
|
|
TaskId string `json:"taskId" dc:"任务ID"`
|
|
|
|
|
|
Status string `json:"status" dc:"业务状态"`
|
|
|
|
|
|
GatewayState int `json:"gatewayState" dc:"网关状态"`
|
|
|
|
|
|
ErrorMessage string `json:"errorMessage" dc:"错误信息"`
|
|
|
|
|
|
Messages any `json:"messages" dc:"最终消息数组"`
|
|
|
|
|
|
OssFile string `json:"ossFile" dc:"结果文件地址"`
|
|
|
|
|
|
FileType string `json:"fileType" dc:"结果文件类型"`
|
|
|
|
|
|
}
|