AI分析功能:LLM Key 改为数据库管理,支持管理员后台配置

This commit is contained in:
fish
2026-05-10 16:21:15 +08:00
parent ad9edf7ad4
commit 99c2a5bcbf
12 changed files with 814 additions and 23 deletions

View File

@@ -40,7 +40,20 @@ func main() {
log.Fatalf("bootstrap: %v", err)
}
deps := &handlers.Deps{Auth: authDB, Futures: futures, TushareURL: cfg.TushareAPIURL}
if err := auth.BootstrapLLMConfig(futures); err != nil {
log.Fatalf("bootstrap llm config: %v", err)
}
deps := &handlers.Deps{
Auth: authDB,
Futures: futures,
TushareURL: cfg.TushareAPIURL,
AIConfig: &handlers.AIConfig{
BaseURL: cfg.LLMBaseURL,
APIKey: cfg.LLMAPIKey,
Model: cfg.LLMModel,
},
}
dist, err := fs.Sub(distFS, "dist")
if err != nil {