Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net: The method for adding a message for AgentGroupChat should align with ChatHistory #6035

Open
matthewbolanos opened this issue Apr 29, 2024 · 3 comments · May be fixed by #6066
Open

.Net: The method for adding a message for AgentGroupChat should align with ChatHistory #6035

matthewbolanos opened this issue Apr 29, 2024 · 3 comments · May be fixed by #6066
Assignees
Labels
agents enhancement experimental Associated with an experimental feature .NET Issue or Pull requests regarding .NET code sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)

Comments

@matthewbolanos
Copy link
Member

For ChatHistory, to add the message, you do this:

history.AddMessage(
        AuthorRole.User,
        Console.ReadLine()!
    );

For AgentGroupChat, to add the message, you do this:

chat.AddChatMessage(new ChatMessageContent(AuthorRole.User, Console.ReadLine()!));

Ideally AgentGroupChat aligns on AddMessage that accepts the role and message.

@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code triage labels Apr 29, 2024
@github-actions github-actions bot changed the title The method for adding a message for AgentGroupChat should align with ChatHistory .Net: The method for adding a message for AgentGroupChat should align with ChatHistory Apr 29, 2024
@crickman
Copy link
Contributor

This is the pattern Mark proposed on code-review. Apparently the ChatHistory.AddMessage() method you identified is extraneous (Toub); although, I'm not 100% clear on what changes are planned.

@crickman crickman added the experimental Associated with an experimental feature label Apr 29, 2024
@matthewbolanos
Copy link
Member Author

In that case, ChatHistory should have AddChatMessage. Either way, there should be some parallelism between the two.

@crickman
Copy link
Contributor

The equivalent is the Add method on List:

image

@matthewbolanos matthewbolanos added enhancement sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community) labels Apr 30, 2024
@crickman crickman linked a pull request May 1, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agents enhancement experimental Associated with an experimental feature .NET Issue or Pull requests regarding .NET code sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants