Bugfix
All checks were successful
release-tag / release-image (push) Successful in 1m29s

This commit is contained in:
2026-07-27 19:18:36 +02:00
parent 9b3227348d
commit f21da92dc6
15 changed files with 316 additions and 49 deletions

View File

@@ -43,7 +43,7 @@ func main() {
ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
defer cancel()
g := glpi.New(cfg.GLPIURL, cfg.GLPIAPIVersion, cfg.GLPIClientID, cfg.GLPIClientSecret, cfg.GLPIUsername, cfg.GLPIPassword, cfg.GLPITimeout)
o := ollama.New(cfg.OllamaURL, cfg.OllamaModel, cfg.OllamaEmbeddingModel, cfg.CommunicationLanguage, cfg.CommunicationStyle, cfg.OllamaTimeout)
o := ollama.New(cfg.OllamaURL, cfg.OllamaModel, cfg.OllamaEmbeddingModel, cfg.CommunicationLanguage, cfg.CommunicationStyle, cfg.OllamaTimeout, cfg.OllamaNumPredict, cfg.OllamaKeepAlive, cfg.OllamaThink, cfg.OllamaMaxConcurrent)
if err := g.ValidateContract(ctx); err != nil {
slog.Error("GLPI API contract validation failed", "error", err)
os.Exit(1)
@@ -68,10 +68,13 @@ func main() {
}
k, err := knowledge.Load(ctx, cfg.KnowledgeDir, cfg.DataDir, o, cfg.RAGEnabled, cfg.KnowledgeAllowedSources)
if err != nil {
slog.Warn("knowledge embedding index unavailable; refusing startup while RAG_ENABLED=true", "error", err)
if cfg.RAGEnabled {
os.Exit(1)
}
slog.Error("knowledge store initialization failed",
"error", err,
"knowledge_dir", cfg.KnowledgeDir,
"data_dir", cfg.DataDir,
"rag_enabled", cfg.RAGEnabled,
)
os.Exit(1)
}
m := metrics.New()
m.SetKnowledgeDocs(k.Count())