Documentation
¶
Index ¶
- func CheckSessionInfo(cfg *Config) error
- type AiDrawClient
- func (a *AiDrawClient) AddContainer(container *Container)
- func (a *AiDrawClient) DelContainer(identify string)
- func (a *AiDrawClient) Generate(ctx context.Context, prompts []string, variation bool, upscale bool, ...) error
- func (a *AiDrawClient) GetContainer(identify string) *Container
- func (a *AiDrawClient) ReadImageChan(identify string) chan *ai.GenerateInfo
- func (a *AiDrawClient) ToImages(ctx context.Context, client *discord.Client, image *ai.Image, imgDir string, ...) []*Image
- type Album
- type Config
- type Container
- type Image
- type MessageBroker
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSessionInfo ¶
Types ¶
type AiDrawClient ¶ added in v1.0.3
type AiDrawClient struct {
AiCli ai.Client
DiscordCli *discord.Client
sync.Mutex
MessageBroker
// contains filtered or unexported fields
}
func NewCli ¶ added in v1.0.3
func NewCli(ctx context.Context, cfg *Config) (drawClient *AiDrawClient, err error)
func (*AiDrawClient) AddContainer ¶ added in v1.0.3
func (a *AiDrawClient) AddContainer(container *Container)
func (*AiDrawClient) DelContainer ¶ added in v1.0.3
func (a *AiDrawClient) DelContainer(identify string)
func (*AiDrawClient) GetContainer ¶ added in v1.0.3
func (a *AiDrawClient) GetContainer(identify string) *Container
func (*AiDrawClient) ReadImageChan ¶ added in v1.0.3
func (a *AiDrawClient) ReadImageChan(identify string) chan *ai.GenerateInfo
type Config ¶
type Config struct {
Debug bool `yaml:"debug"`
Bot string `yaml:"bot"`
Proxy string `yaml:"proxy"`
Output string `yaml:"output"`
Album string `yaml:"album"`
Prefix string `yaml:"prefix"`
Suffix string `yaml:"suffix"`
Prompts []string `yaml:"prompts"`
Variation bool `yaml:"variation"`
Upscale bool `yaml:"upscale"`
Download bool `yaml:"download"`
Thumbnail bool `yaml:"thumbnail"`
Channel string `yaml:"channel"`
GuildID string `yaml:"groupID"`
Concurrency int `yaml:"concurrency"`
Wait time.Duration `yaml:"wait"`
SessionFile string `yaml:"session"`
Session Session `yaml:"-"`
ReplicateToken string `yaml:"replicate-token"`
MidjourneyCDN bool `yaml:"midjourney-cdn"`
}
type Container ¶ added in v1.0.3
type Container struct {
Identify string
InfoChan chan *ai.GenerateInfo
Task int
}
type MessageBroker ¶ added in v1.0.3
Click to show internal directories.
Click to hide internal directories.
