feat: 添加图生图 DTO
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4bae8e9b64
commit
8ec1942e74
34
backend/gateway/dto/image_dto.go
Normal file
34
backend/gateway/dto/image_dto.go
Normal file
@ -0,0 +1,34 @@
|
||||
package dto
|
||||
|
||||
// ImageGenerationRequest MiniMax 图生图请求
|
||||
type ImageGenerationRequest struct {
|
||||
Model string `json:"model" binding:"required"`
|
||||
Prompt string `json:"prompt" binding:"required"`
|
||||
AspectRatio string `json:"aspect_ratio"`
|
||||
SubjectReference []SubjectReference `json:"subject_reference"`
|
||||
N int `json:"n"` // 1-4
|
||||
}
|
||||
|
||||
type SubjectReference struct {
|
||||
Type string `json:"type"`
|
||||
ImageFile string `json:"image_file"`
|
||||
}
|
||||
|
||||
// ImageJobResponse 图生图任务响应
|
||||
type ImageJobResponse struct {
|
||||
JobID string `json:"job_id"`
|
||||
Status string `json:"status"`
|
||||
Progress int `json:"progress"`
|
||||
Images []string `json:"images,omitempty"`
|
||||
ErrorMsg string `json:"error_msg,omitempty"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
CompletedAt int64 `json:"completed_at,omitempty"`
|
||||
}
|
||||
|
||||
// ImageJobCreateResponse 创建任务响应
|
||||
type ImageJobCreateResponse struct {
|
||||
JobID string `json:"job_id"`
|
||||
Status string `json:"status"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user