Documentation ¶
Index ¶
- func ErrorChatGPTJobIsAlreadyUsed(id int) error
- func ErrorChatGPTJobIsNotExist(id int) error
- func ErrorDreamBoothJobIsAlreadyUsed(id int) error
- func ErrorDreamBoothJobIsNotExist(id int) error
- func ErrorOpenAIJobIsAlreadyUsed(id int) error
- func ErrorOpenAIJobIsNotExist(id int) error
- func NewSerializedDBBodyRequest(key, body string) []byte
- func NewTClient(username string) *clientState
- type AI
- type ChatGPTBot
- type ChatGPTSettings
- type Config
- type DBBodyRequest
- type DreamBooth
- func (d *DreamBooth) FetchQueuedImages(requestID, key string) ([]byte, error)
- func (d *DreamBooth) GenerateImage(ctx context.Context, prompt string) (body []byte, fileName string, err error)
- func (d *DreamBooth) GenerateText(_ context.Context, _ string) (body []byte, err error)
- func (d *DreamBooth) TextToImage(ctx context.Context, text, key string) ([]byte, string, error)
- type DreamBoothSettings
- type Messenger
- type OpenAI
- type OpenAISettings
- type PermissionSettings
- type RolesSettings
- type Stats
- type StatsSettings
- type TBotOpenAI
- type Telegram
- type TelegramSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTClient ¶
func NewTClient(username string) *clientState
Types ¶
type ChatGPTBot ¶
type ChatGPTBot struct{}
func NewChatGPTBot ¶
func NewChatGPTBot() *ChatGPTBot
func (*ChatGPTBot) GenerateImage ¶
func (*ChatGPTBot) GenerateText ¶
type ChatGPTSettings ¶
type Config ¶
type Config struct { Telegram TelegramSettings `yaml:"telegram"` ChatGPT ChatGPTSettings `yaml:"chatgpt"` OpenAI OpenAISettings `yaml:"openai"` DreamBooth DreamBoothSettings `yaml:"dreambooth"` Roles RolesSettings `yaml:"roles"` Permissions PermissionSettings `yaml:"permissions"` Stats StatsSettings `yaml:"stats"` Logger zap.Config `yaml:"log"` LenMessageChan int `yaml:"len_message_chan"` LenQueueTaskChan int `yaml:"len_queue_task_chan"` QueueMessageWorkers int `yaml:"queue_message_workers"` MaxClientOpenAIJobs int `yaml:"max_client_openai_jobs"` MaxClientChatGPTJobs int `yaml:"max_client_chatgpt_jobs"` MaxClientDreamBoothJobs int `yaml:"max_client_dreambooth_jobs"` MaxLogRows int `yaml:"max_log_rows"` PathBlackList string `yaml:"path_blacklist"` }
type DBBodyRequest ¶
type DBBodyRequest struct {
// contains filtered or unexported fields
}
DBBodyRequest - DreamBooth Text to Image API: https://stablediffusionapi.com/docs/community-models-api-v4/dreamboothtext2img/
type DreamBooth ¶
type DreamBooth struct {
// contains filtered or unexported fields
}
func NewDreamBoothAPI ¶
func NewDreamBoothAPI(log *zap.Logger, cfg *DreamBoothSettings) *DreamBooth
func (*DreamBooth) FetchQueuedImages ¶
func (d *DreamBooth) FetchQueuedImages(requestID, key string) ([]byte, error)
FetchQueuedImages - https://stablediffusionapi.com/docs/community-models-api-v4/dreamboothfetchqueimg
func (*DreamBooth) GenerateImage ¶
func (*DreamBooth) GenerateText ¶
func (*DreamBooth) TextToImage ¶
TextToImage - https://stablediffusionapi.com/docs/community-models-api-v4/dreamboothtext2img
type DreamBoothSettings ¶
type OpenAI ¶
type OpenAI struct {
// contains filtered or unexported fields
}
func NewOpenAI ¶
func NewOpenAI(cfg *OpenAISettings) *OpenAI
func (*OpenAI) GenerateImage ¶
type OpenAISettings ¶
type PermissionSettings ¶
type RolesSettings ¶
type StatsSettings ¶
type TBotOpenAI ¶
type TBotOpenAI struct {
// contains filtered or unexported fields
}
func NewTBotOpenAI ¶
func NewTBotOpenAI(cfg *Config, log *zap.Logger) (*TBotOpenAI, error)
func (*TBotOpenAI) Run ¶
func (t *TBotOpenAI) Run()
func (*TBotOpenAI) Stop ¶
func (t *TBotOpenAI) Stop()
type Telegram ¶
type Telegram struct {
// contains filtered or unexported fields
}
func NewTelegram ¶
func NewTelegram(cfg *TelegramSettings, log *zap.Logger, msgChan chan<- *message) (*Telegram, error)
type TelegramSettings ¶
Click to show internal directories.
Click to hide internal directories.