mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-04-27 21:44:25 +08:00
3D生成服务已经完成
This commit is contained in:
@@ -157,6 +157,24 @@ func LoadSystemConfig(db *gorm.DB) *types.SystemConfig {
|
||||
logger.Error("load moderation config error: ", err)
|
||||
}
|
||||
|
||||
// 加载即梦AI配置
|
||||
var jimengConfig types.JimengConfig
|
||||
sysConfig.Id = 0
|
||||
db.Where("name", types.ConfigKeyJimeng).First(&sysConfig)
|
||||
err = utils.JsonDecode(sysConfig.Value, &jimengConfig)
|
||||
if err != nil {
|
||||
logger.Error("load jimeng config error: ", err)
|
||||
}
|
||||
|
||||
// 加载3D生成配置
|
||||
var ai3dConfig types.AI3DConfig
|
||||
sysConfig.Id = 0
|
||||
db.Where("name", types.ConfigKeyAI3D).First(&sysConfig)
|
||||
err = utils.JsonDecode(sysConfig.Value, &ai3dConfig)
|
||||
if err != nil {
|
||||
logger.Error("load ai3d config error: ", err)
|
||||
}
|
||||
|
||||
return &types.SystemConfig{
|
||||
Base: baseConfig,
|
||||
License: license,
|
||||
@@ -167,5 +185,7 @@ func LoadSystemConfig(db *gorm.DB) *types.SystemConfig {
|
||||
Captcha: captchaConfig,
|
||||
WxLogin: wxLoginConfig,
|
||||
Moderation: moderationConfig,
|
||||
Jimeng: jimengConfig,
|
||||
AI3D: ai3dConfig,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user