Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client handles DALL-E API requests
type ReqDalle ¶
type ReqDalle struct { // Prompt is the text prompt for image generation. // Required field that guides the image generation process. Prompt string `json:"prompt"` // Model specifies which DALL-E model to use Model llm.ServiceName `json:"model"` // N specifies the number of images to generate N int `json:"n"` // Size specifies the square image size. // // - Valid values: "1024x1024", "1792x1024", "1024x1792" // - Cannot be used together with Width and Height Size string `json:"size,omitempty"` // Width of the generated image in pixels. // // - Cannot be used together with Size // - Must be provided together with Height Width int `json:"width,omitempty"` // Height of the generated image in pixels. // // - Cannot be used together with Size // - Must be provided together with Width Height int `json:"height,omitempty"` // Quality specifies the image generation quality level. // // - Only applicable for DALL-E 3 // - Valid values: "standard" (default), "hd" // - "hd" provides higher quality but increased cost and latency Quality string `json:"quality,omitempty"` // Style specifies the visual style of the generated image. // // - Valid values: "vivid" (default), "natural" // - "vivid" produces more vibrant and dramatic images // - "natural" produces more subtle and realistic images Style string `json:"style,omitempty"` }
ReqDalle represents a request to generate an image using DALL-E models.
func (*ReqDalle) Build ¶
func (r *ReqDalle) Build() (receiptModel llm.ServiceName, err error)
Build checks if the request parameters are valid. It also fills in default values for missing fields.
func (*ReqDalle) ValidateSizeForModel ¶
func (r *ReqDalle) ValidateSizeForModel() (receiptModel llm.ServiceName, err error)
Click to show internal directories.
Click to hide internal directories.