diff --git a/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.Summary.cs b/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.Summary.cs index a34a2793..03e098b1 100644 --- a/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.Summary.cs +++ b/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.Summary.cs @@ -27,6 +27,8 @@ public partial class ConversationService contents.Add(content); } + if (contents.IsNullOrEmpty()) return string.Empty; + var router = await agentService.LoadAgent(AIAssistant); var prompt = GetPrompt(router, contents); var summary = await Summarize(router, prompt);