From 108be726de89e15a08179d84c92dfd4dcd9dd522 Mon Sep 17 00:00:00 2001 From: Haiping Chen Date: Tue, 22 Oct 2024 06:43:40 -0500 Subject: [PATCH] Rollback GetConversationContent. --- .../Routing/RoutingService.GetConversationContent.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Infrastructure/BotSharp.Core/Routing/RoutingService.GetConversationContent.cs b/src/Infrastructure/BotSharp.Core/Routing/RoutingService.GetConversationContent.cs index f8efab46..60e81bbe 100644 --- a/src/Infrastructure/BotSharp.Core/Routing/RoutingService.GetConversationContent.cs +++ b/src/Infrastructure/BotSharp.Core/Routing/RoutingService.GetConversationContent.cs @@ -16,7 +16,15 @@ public partial class RoutingService role = agent.Name; } - conversation += $"{role}: {dialog.Payload ?? dialog.Content}\r\n"; + if (role == AgentRole.User) + { + conversation += $"{role}: {dialog.Payload ?? dialog.Content}\r\n"; + } + else + { + // Assistant reply doesn't need help with payload + conversation += $"{role}: {dialog.Content}\r\n"; + } } return conversation;