feat: support set openai api host (#1292)

* Docker

* feat: support set openai api host

* fix css

* fix eslint

* use API in backend & put host check in plugin/openai

* fix go-static-checks
This commit is contained in:
Wujiao233
2023-03-06 20:10:53 +08:00
committed by GitHub
parent fd99c5461c
commit 003161ea54
9 changed files with 108 additions and 6 deletions

View File

@ -52,6 +52,7 @@ func (s *Server) registerSystemRoutes(g *echo.Group) {
ExternalURL: "",
},
StorageServiceID: 0,
OpenAIAPIHost: "",
}
systemSettingList, err := s.Store.FindSystemSettingList(ctx, &api.SystemSettingFind{})
@ -100,6 +101,8 @@ func (s *Server) registerSystemRoutes(g *echo.Group) {
}
} else if systemSetting.Name == api.SystemSettingStorageServiceIDName {
systemStatus.StorageServiceID = int(value.(float64))
} else if systemSetting.Name == api.SystemSettingOpenAIAPIHost {
systemStatus.OpenAIAPIHost = value.(string)
}
}