ai

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bulk

func Bulk(ctx context.Context, cli Client, prompts []string, skip []int, variationEnabled, upscaleEnabled bool, concurrency int, wait time.Duration) <-chan (*Image)

Types

type Client

type Client interface {
	Start(ctx context.Context) error
	Imagine(ctx context.Context, prompt string) (*Preview, error)
	Upscale(ctx context.Context, preview *Preview, index int) ([]string, error)
	Variation(ctx context.Context, preview *Preview, index int) (*Preview, error)
	Concurrency() int
}

type Error added in v1.0.8

type Error struct {
	// contains filtered or unexported fields
}

func NewError added in v1.0.8

func NewError(err error, temporary bool) Error

func NewFatal added in v1.0.12

func NewFatal(err error) Error

func (Error) Error added in v1.0.8

func (e Error) Error() string

func (Error) Fatal added in v1.0.12

func (e Error) Fatal() bool

func (Error) Temporary added in v1.0.8

func (e Error) Temporary() bool

func (Error) Unwrap added in v1.0.8

func (e Error) Unwrap() error

type Image

type Image struct {
	URL    string
	Prompt string

	Preview     bool
	PromptIndex int
	ImageIndex  int
	IsLast      bool
}

func (*Image) FileName

func (i *Image) FileName() string

func (*Image) FileNames

func (i *Image) FileNames() []string

type Preview

type Preview struct {
	URL            string
	Prompt         string
	ResponsePrompt string
	MessageID      string
	ImageIDs       []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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