From d053dc249cc227c4b63df3a3722cdfbd441e99ea Mon Sep 17 00:00:00 2001 From: mudler Date: Sun, 15 Dec 2024 18:14:13 +0100 Subject: [PATCH] Panic for now if agent config is failing Signed-off-by: mudler --- agent/agent.go | 2 ++ example/webui/agentpool.go | 1 + 2 files changed, 3 insertions(+) diff --git a/agent/agent.go b/agent/agent.go index 9b920ad..04eb82f 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -156,6 +156,8 @@ func (a *Agent) ResetConversation() { defer a.Unlock() // store into memory the conversation before pruning it + // TODO: Shall we summarize the conversation into a bullet list of highlights + // using the LLM instead? if a.options.enableKB { for _, message := range a.currentConversation { if message.Role == "user" { diff --git a/example/webui/agentpool.go b/example/webui/agentpool.go index 805bc3f..9e612a8 100644 --- a/example/webui/agentpool.go +++ b/example/webui/agentpool.go @@ -285,6 +285,7 @@ func (a *AgentPool) startAgentWithConfig(name string, config *AgentConfig) error go func() { if err := agent.Run(); err != nil { xlog.Error("Agent stopped", "error", err.Error()) + panic(err) } }()