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: Bug: The AgentChat history should contain all agent's messages #7183

Closed
EdenTanami opened this issue Jul 10, 2024 · 0 comments · Fixed by #7216
Closed

.Net: Bug: The AgentChat history should contain all agent's messages #7183

EdenTanami opened this issue Jul 10, 2024 · 0 comments · Fixed by #7216
Assignees
Labels
agents bug Something isn't working .NET Issue or Pull requests regarding .NET code PR: in progress Under development and/or addressing feedback

Comments

@EdenTanami
Copy link

Describe the bug
In the current implementation, the ChatCompletionAgent returns only the final assistant response, the functions messages are appended to the channel's chat history.
So the ChatHistoryChannel returns to the AgentChat (and broadcast to the other channels) only the final assistant response.
Therefor the user, that creates the AgentChat, doesn't have access to the functions invocation.

Expected behavior

  1. All the messages that the ChatCompletionAgent creates during its invocation should be appended to the AgentChat's history.
  2. The ChatHistoryChannel shouldn't broadcast the function messages to the other channel as they aren't relevant to them and also not necessarily valid to them.
  3. Might need to filter the function messages when creating a new channel.

Additional context
Another thing that should be considered -
IAutoFunctionFilterInvocation enables terminating the function calling loop. In such cases the ChatCompletion returns to the caller the last function response (this response is also appended to the channel history).
Therefor the response's role should be checked before:

  1. Adding the chat completion response to the channel chat history (to avoid duplication).
  2. Broadcasting the chat completion response to the other channels (to not send them function response).

Platform
OS: Windows
IDE: Visual Studio,
Language: C#
Source: SK NuGet package version 1.15.1

@EdenTanami EdenTanami added the bug Something isn't working label Jul 10, 2024
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code triage labels Jul 10, 2024
@github-actions github-actions bot changed the title Bug: The AgentChat history should contain all agent's messages .Net: Bug: The AgentChat history should contain all agent's messages Jul 10, 2024
@markwallace-microsoft markwallace-microsoft moved this to Backlog: Planned in Semantic Kernel Jul 10, 2024
@crickman crickman added the PR: in progress Under development and/or addressing feedback label Jul 10, 2024
@crickman crickman moved this from Backlog: Planned to Sprint: In Progress in Semantic Kernel Jul 11, 2024
@crickman crickman linked a pull request Jul 11, 2024 that will close this issue
4 tasks
@github-project-automation github-project-automation bot moved this from Sprint: In Progress to Sprint: Done in Semantic Kernel Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agents bug Something isn't working .NET Issue or Pull requests regarding .NET code PR: in progress Under development and/or addressing feedback
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants