You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python: .Net: Magentic orchestration to return the last agent message when limits reached (#12839)
### 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.
-->
Related to #12687
Related to #12656
Currently, the Magentic orchestration returns a static message if the
max reset limit or the max invocation limit is reached.
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Return the last agent response if either of the limit is reached.
### 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 😄
---------
Co-authored-by: Chris <[email protected]>
awaitthis.PublishMessageAsync("Maximum number of invocations reached.".AsResultMessage(),this._orchestrationType,cancellationToken).ConfigureAwait(false);
awaitthis.PublishMessageAsync("I've reaches the maximum number of invocations. No partial result available.".AsResultMessage(),this._orchestrationType,cancellationToken).ConfigureAwait(false);
awaitthis.PublishMessageAsync("I've experienced multiple failures and am unable to continue.".AsResultMessage(),this._orchestrationType,cancellationToken).ConfigureAwait(false);
awaitthis.PublishMessageAsync("I've experienced multiple failures and am unable to continue. No partial result available.".AsResultMessage(),this._orchestrationType,cancellationToken).ConfigureAwait(false);
0 commit comments