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

Bug: Agent streaming duplicates message when IAutoFunctionInvocationFilter uses Terminate #8825

Closed
crickman opened this issue Sep 16, 2024 · 0 comments · Fixed by #8852
Closed
Assignees
Labels
agents bug Something isn't working experimental Associated with an experimental feature sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)

Comments

@crickman
Copy link
Contributor

Describe the bug
Terminated FunctionResultContent duplicated for both:

  1. "No Chat" Agent Invocation
  2. Agent-Chat

Expected behavior
FunctionResultContent message not duplicated

Platform

  • Language: [e.g. C#]
@crickman crickman added bug Something isn't working triage experimental Associated with an experimental feature agents labels Sep 16, 2024
@crickman crickman self-assigned this Sep 16, 2024
@evchaki evchaki added the sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community) label Sep 17, 2024
@crickman crickman linked a pull request Sep 17, 2024 that will close this issue
4 tasks
github-merge-queue bot pushed a commit that referenced this issue Sep 17, 2024
…on (#8852)

### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

Respond to two customer identified issues:
1. Add support for `AdditionalInstructions` for creating an assistant as
well as invocation override.
Fixes #8715

2. Fix issue with duplicated tool-call result when using
`ChatCompletionAgent` streaming
Fixes #8825

### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

1. `AdditionalInstructions` option wasn't included in the V2 migration
as oversight. This is a pure addition.
2. Unit-tests added for new `AdditionalInstructions` option.
4. Duplication of the terminated function result addressed within
`ChatCompletionAgent`
5. Streaming cases added to existing sample demonstrating use of
`IAutoFunctionInvocationFilter` :
`Concepts/Agents/ChatCompletion_FunctionTermination`

### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
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 experimental Associated with an experimental feature sk team issue A tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)
Projects
Status: Sprint: Done
Development

Successfully merging a pull request may close this issue.

3 participants