diff --git a/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.Summary.cs b/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.Summary.cs index ba141e08..04c3c6f5 100644 --- a/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.Summary.cs +++ b/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.Summary.cs @@ -104,12 +104,15 @@ public partial class ConversationService var role = dialog.Role; if (role == AgentRole.Function) continue; - if (role != AgentRole.User) + if (role == AgentRole.User) + { + conversation += $"{role}: {dialog.Payload ?? dialog.Content}\r\n"; + } + else { role = AgentRole.Assistant; - } - - conversation += $"{role}: {dialog.Payload ?? dialog.Content}\r\n"; + conversation += $"{role}: {dialog.Content}\r\n"; + } } if (string.IsNullOrEmpty(conversation))