Skip to content

Commit 4977cc7

Browse files
authored
Merge pull request #1072 from yileicn/master
hotfix summary
2 parents 73934bf + a86a966 commit 4977cc7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.Summary.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,15 @@ private string GetConversationContent(List<RoleDialogModel> dialogs, int maxDial
104104
var role = dialog.Role;
105105
if (role == AgentRole.Function) continue;
106106

107-
if (role != AgentRole.User)
107+
if (role == AgentRole.User)
108108
{
109-
role = AgentRole.Assistant;
109+
conversation += $"{role}: {dialog.Payload ?? dialog.Content}\r\n";
110110
}
111-
112-
conversation += $"{role}: {dialog.Payload ?? dialog.Content}\r\n";
111+
else
112+
{
113+
role = AgentRole.Assistant;
114+
conversation += $"{role}: {dialog.Content}\r\n";
115+
}
113116
}
114117

115118
if (string.IsNullOrEmpty(conversation))

0 commit comments

Comments
 (0)