mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
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:
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user