ai

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 10 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 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
	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