mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 23:41:12 +08:00
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:
@@ -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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user