33 lines
1.3 KiB
Go
33 lines
1.3 KiB
Go
package dto
|
|
|
|
import "encoding/json"
|
|
|
|
type ImageRequest struct {
|
|
Model string `json:"model"`
|
|
Prompt string `json:"prompt" binding:"required"`
|
|
N int `json:"n,omitempty"`
|
|
Size string `json:"size,omitempty"`
|
|
Quality string `json:"quality,omitempty"`
|
|
ResponseFormat string `json:"response_format,omitempty"`
|
|
Style json.RawMessage `json:"style,omitempty"`
|
|
User json.RawMessage `json:"user,omitempty"`
|
|
ExtraFields json.RawMessage `json:"extra_fields,omitempty"`
|
|
Background json.RawMessage `json:"background,omitempty"`
|
|
Moderation json.RawMessage `json:"moderation,omitempty"`
|
|
OutputFormat json.RawMessage `json:"output_format,omitempty"`
|
|
OutputCompression json.RawMessage `json:"output_compression,omitempty"`
|
|
PartialImages json.RawMessage `json:"partial_images,omitempty"`
|
|
// Stream bool `json:"stream,omitempty"`
|
|
Watermark *bool `json:"watermark,omitempty"`
|
|
}
|
|
|
|
type ImageResponse struct {
|
|
Data []ImageData `json:"data"`
|
|
Created int64 `json:"created"`
|
|
}
|
|
type ImageData struct {
|
|
Url string `json:"url"`
|
|
B64Json string `json:"b64_json"`
|
|
RevisedPrompt string `json:"revised_prompt"`
|
|
}
|