Skip to content

Commit 184d3ea

Browse files
committed
fix: Update for the new AgentRunResponseUpdate merge logic
AIAgent always sends out List<ChatMessage> now.
1 parent cd485cd commit 184d3ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dotnet/samples/GettingStarted/Workflows/Agents/WorkflowAsAnAgent/WorkflowFactory.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private static ChatClientAgent GetLanguageAgent(string targetLanguage, IChatClie
4242
/// Executor that aggregates the results from the concurrent agents.
4343
/// </summary>
4444
private sealed class ConcurrentAggregationExecutor() :
45-
Executor<ChatMessage>("ConcurrentAggregationExecutor"), IResettableExecutor
45+
Executor<List<ChatMessage>>("ConcurrentAggregationExecutor"), IResettableExecutor
4646
{
4747
private readonly List<ChatMessage> _messages = [];
4848

@@ -53,9 +53,9 @@ private sealed class ConcurrentAggregationExecutor() :
5353
/// <param name="context">Workflow context for accessing workflow services and adding events</param>
5454
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests.
5555
/// The default is <see cref="CancellationToken.None"/>.</param>
56-
public override async ValueTask HandleAsync(ChatMessage message, IWorkflowContext context, CancellationToken cancellationToken = default)
56+
public override async ValueTask HandleAsync(List<ChatMessage> message, IWorkflowContext context, CancellationToken cancellationToken = default)
5757
{
58-
this._messages.Add(message);
58+
this._messages.AddRange(message);
5959

6060
if (this._messages.Count == 2)
6161
{

0 commit comments

Comments
 (0)