feat: add system config item for reward image, add app config item to use custom text2img param json file

This commit is contained in:
RockYang
2023-10-08 17:48:50 +08:00
parent 5fdff90a10
commit 91dfd59731
9 changed files with 296 additions and 131 deletions

View File

@@ -34,7 +34,7 @@ func NewDefaultConfig() *types.AppConfig {
},
},
MjConfig: types.MidJourneyConfig{Enabled: false},
SdConfig: types.StableDiffusionConfig{Enabled: false},
SdConfig: types.StableDiffusionConfig{Enabled: false, Txt2ImgJsonPath: "res/text2img.json"},
WeChatBot: false,
}
}

View File

@@ -42,9 +42,10 @@ type WeChatConfig struct {
}
type StableDiffusionConfig struct {
Enabled bool
ApiURL string
ApiKey string
Enabled bool
ApiURL string
ApiKey string
Txt2ImgJsonPath string
}
type AliYunSmsConfig struct {
@@ -112,4 +113,5 @@ type SystemConfig struct {
EnabledRegister bool `json:"enabled_register"`
EnabledMsg bool `json:"enabled_msg"` // 启用短信验证码服务
EnabledDraw bool `json:"enabled_draw"` // 启动 AI 绘画功能
RewardImg string `json:"reward_img"` // 众筹收款二维码地址
}