image

package
v0.0.0-...-da38182 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = cli.Command{
	Name:   "image",
	Action: cmdCreate,
	Flags: []cli.Flag{
		flagPrompt,
		flagN,
		flagSize,
		flagFormat,
		flagUser,
	},
}

Functions

This section is empty.

Types

type ImageReq

type ImageReq struct {
	Prompt         string `json:"prompt"`          // A text description of the desired image(s). The maximum length is 1000 characters.
	N              int    `json:"n"`               // The number of images to generate. Must be between 1 and 10.
	Size           string `json:"size"`            // The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024.
	ResponseFormat string `json:"response_format"` // The format in which the generated images are returned. Must be one of url or b64_json.
	User           Role   `json:"user"`
}

type ImageRes

type ImageRes struct {
	Created int64 `json:"created"`
	Data    []struct {
		B46Json string `json:"b64_json"`
		URL     string `json:"url"`
	} `json:"data"`
}

type Role

type Role string
const (
	User Role = "user"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL