71 lines
3.7 KiB
Go
71 lines
3.7 KiB
Go
package dto
|
||
|
||
import "github.com/gogf/gf/v2/frame/g"
|
||
|
||
type ComposeMessagesReq struct {
|
||
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:"构建类型"` //判断节点
|
||
NodeId string `p:"nodeId" json:"nodeId" dc:"节点ID"`
|
||
SessionId string `p:"sessionId" json:"sessionId" dc:"会话ID"` //v:"required#sessionId不能为空"
|
||
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 含义接近则严格覆盖系统字段"`
|
||
Consult []ConsultItem `json:"consult" dc:"附件列表(图片/视频/音频)"`
|
||
SkillName string `p:"skillName" json:"skillName" dc:"技能名称"`
|
||
}
|
||
|
||
// ConsultItem 单个附件
|
||
type ConsultItem struct {
|
||
Type string `json:"type" dc:"附件类型:image/video/audio"`
|
||
Url string `json:"url" dc:"附件地址"`
|
||
}
|
||
type ComposeMessagesRes struct {
|
||
TaskId string `json:"taskId" dc:"任务ID"`
|
||
}
|
||
|
||
// MultiRoundResult 多轮返回结果
|
||
type MultiRoundResult struct {
|
||
TotalRounds int `json:"total_rounds"` // 总轮数
|
||
Rounds []map[string]any `json:"rounds"` // 每轮详情(动态类型)
|
||
}
|
||
|
||
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:"结果文件类型"`
|
||
Messages map[string]any `json:"messages" dc:"消息数组"`
|
||
ErrorMsg string `json:"error_msg" dc:"错误信息"`
|
||
EpicycleId int64 `json:"epicycleId" dc:"轮次ID"`
|
||
}
|
||
|
||
type CallbackRes struct {
|
||
}
|
||
|
||
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:"结果文件类型"`
|
||
}
|
||
|
||
type GetPromptTextReq struct {
|
||
g.Meta `path:"/getPromptText" method:"get" tags:"提示词测试" summary:"测试文本生成" dc:"传入提示词,返回模型纯文本结果,用于接口连通性测试"`
|
||
Prompt string `p:"prompt" json:"prompt" dc:"测试用提示词"`
|
||
}
|
||
|
||
type GetPromptTextRes struct {
|
||
Messages any `json:"messages" dc:"最终消息数组"`
|
||
}
|