mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-05-05 01:37:46 +08:00
refactor: Moves the LLM factory initialization logic to the dao package. (#13476)
### What problem does this PR solve? refactor: Moves the LLM factory initialization logic to the `dao` package. Removes the `init_data` package and integrates the LLM factory initialization functionality into the `dao` package. Adds a `utility` package to provide general utility functions. Updates `server_main.go` to use the new initialization path. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) Co-authored-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@ -6,8 +6,7 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
"os/signal"
|
||||
"ragflow/internal/common"
|
||||
"ragflow/internal/init_data"
|
||||
"ragflow/internal/common"
|
||||
"ragflow/internal/server"
|
||||
"ragflow/internal/utility"
|
||||
"strings"
|
||||
@ -67,7 +66,7 @@ func main() {
|
||||
}
|
||||
|
||||
// Initialize LLM factory data models from configuration file
|
||||
if err := init_data.InitLLMFactory(); err != nil {
|
||||
if err := dao.InitLLMFactory(); err != nil {
|
||||
logger.Error("Failed to initialize LLM factory", err)
|
||||
} else {
|
||||
logger.Info("LLM factory initialized successfully")
|
||||
|
||||
Reference in New Issue
Block a user