mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-09 10:43:44 +08:00
add stable diffusion default negtive prompt system config
This commit is contained in:
@@ -175,4 +175,6 @@ type SystemConfig struct {
|
||||
|
||||
EnableContext bool `json:"enable_context,omitempty"`
|
||||
ContextDeep int `json:"context_deep,omitempty"`
|
||||
|
||||
SdNegPrompt string `json:"sd_neg_prompt"` // SD 默认反向提示词
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ func (h *ChatHandler) sendXunFeiMessage(
|
||||
res = h.DB.Where("id", session.Model.KeyId).Where("enabled", true).Find(&apiKey)
|
||||
}
|
||||
// use the last unused key
|
||||
if res.Error != nil {
|
||||
if apiKey.Id == 0 {
|
||||
res = h.DB.Where("platform", session.Model.Platform).Where("type", "chat").Where("enabled", true).Order("last_used_at ASC").First(&apiKey)
|
||||
}
|
||||
if res.Error != nil {
|
||||
|
||||
@@ -47,9 +47,9 @@ func NewLicenseService(server *core.AppServer, levelDB *store.LevelDB) *LicenseS
|
||||
|
||||
type License struct {
|
||||
Name string `json:"name"`
|
||||
License string `json:"license"`
|
||||
Mid string `json:"mid"`
|
||||
ActiveAt int64 `json:"active_at"`
|
||||
License string `json:"license"`
|
||||
MachineId string `json:"mid"`
|
||||
ActiveAt int64 `json:"active_at"`
|
||||
ExpiredAt int64 `json:"expired_at"`
|
||||
UserNum int `json:"user_num"`
|
||||
}
|
||||
@@ -139,7 +139,7 @@ func (s *LicenseService) fetchLicense() (*types.License, error) {
|
||||
|
||||
return &types.License{
|
||||
Key: res.Data.License,
|
||||
MachineId: res.Data.Mid,
|
||||
MachineId: res.Data.MachineId,
|
||||
UserNum: res.Data.UserNum,
|
||||
ExpiredAt: res.Data.ExpiredAt,
|
||||
IsActive: true,
|
||||
|
||||
@@ -58,6 +58,7 @@ func NewServicePool(db *gorm.DB, redisCli *redis.Client, manager *oss.UploaderMa
|
||||
services = append(services, plusService)
|
||||
}
|
||||
|
||||
// for mid-journey proxy
|
||||
for k, config := range appConfig.MjProxyConfigs {
|
||||
if config.Enabled == false {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user