Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
crickman committed Oct 18, 2024
1 parent c2f544f commit 4ea6b8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dotnet/src/Agents/Abstractions/AggregatorAgent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public sealed class AggregatorAgent(Func<AgentChat> chatProvider) : Agent
protected internal override IEnumerable<string> GetChannelKeys()
{
yield return typeof(AggregatorChannel).FullName!;
yield return this.GetHashCode().ToString();
yield return this.Name ?? this.Id;
}

/// <inheritdoc/>
Expand Down
4 changes: 2 additions & 2 deletions dotnet/src/Agents/UnitTests/AgentChatSerializerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,15 @@ public async Task VerifyDeserializedChatWithAgentsAsync()
public async Task VerifyDeserializedChatWithAggregatorAsync()
{
// Create chat
TestChat chat = new(new AggregatorAgent(() => new TestChat(CreateMockAgent())));
TestChat chat = new(new AggregatorAgent(() => new TestChat(CreateMockAgent())) { Name = "Group" });
chat.AddChatMessage(new ChatMessageContent(AuthorRole.User, "test"));
ChatMessageContent[] messages = await chat.InvokeAsync().ToArrayAsync();

// Serialize and deserialize chat
AgentChatSerializer serializer = await this.CreateSerializerAsync(chat);
Assert.Single(serializer.Participants);

TestChat copy = new(new AggregatorAgent(() => new TestChat(CreateMockAgent())));
TestChat copy = new(new AggregatorAgent(() => new TestChat(CreateMockAgent())) { Name = "Group" });

await serializer.DeserializeAsync(copy);

Expand Down

0 comments on commit 4ea6b8b

Please sign in to comment.