Remove unused codes (#15579)

### What problem does this PR solve?

Remove unused code.

### Type of change

- [x] Refactoring

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-06-03 17:35:36 +08:00
committed by GitHub
parent b363146997
commit 2061edd308
9 changed files with 7 additions and 442 deletions

View File

@@ -110,13 +110,6 @@ func main() {
common.Fatal("Failed to initialize database", zap.Error(err))
}
// Initialize LLM factory data models from configuration file
if err := dao.InitLLMFactory(); err != nil {
common.Error("Failed to initialize LLM factory", err)
} else {
common.Info("LLM factory initialized successfully")
}
// Initialize doc engine
if err := engine.Init(&config.DocEngine); err != nil {
common.Fatal("Failed to initialize doc engine", zap.Error(err))

View File

@@ -91,12 +91,6 @@ func main() {
common.Fatal("Server port is not configured. Please specify via --port flag or config file.")
}
// Load model providers configuration
if err := server.LoadModelProviders(""); err != nil {
common.Fatal("Failed to load model providers", zap.Error(err))
}
common.Info("Model providers loaded", zap.Int("count", len(server.GetModelProviders())))
// Reinitialize logger with configured level if different
if config.Log.Level != "" && config.Log.Level != "info" {
if err := common.Init(config.Log.Level); err != nil {
@@ -118,13 +112,6 @@ func main() {
common.Fatal("Failed to initialize database", zap.Error(err))
}
// Initialize LLM factory data models from configuration file
if err := dao.InitLLMFactory(); err != nil {
common.Error("Failed to initialize LLM factory", err)
} else {
common.Info("LLM factory initialized successfully")
}
// Initialize doc engine
if err := engine.Init(&config.DocEngine); err != nil {
common.Fatal("Failed to initialize doc engine", zap.Error(err))