Skip to content

Commit 53e080e

Browse files
authored
.NET Agents - Update Handoff Orchestration (#12242)
### 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. --> Handoff orchestration ending task prematurely ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> - Update description for _end-task_ function - Ensure user input is published to all orchestration actors ### 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 😄
1 parent 5e488d2 commit 53e080e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dotnet/src/Agents/Orchestration/Handoff/HandoffActor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ public async ValueTask HandleAsync(HandoffMessages.Request item, MessageContext
134134
if (this.InteractiveCallback != null && this._taskSummary == null)
135135
{
136136
ChatMessageContent input = await this.InteractiveCallback().ConfigureAwait(false);
137+
await this.PublishMessageAsync(new HandoffMessages.Response { Message = input }, this.Context.Topic, messageId: null, messageContext.CancellationToken).ConfigureAwait(false);
137138
this._cache.Add(input);
138139
continue;
139140
}
@@ -151,7 +152,7 @@ IEnumerable<KernelFunction> CreateHandoffFunctions()
151152
yield return KernelFunctionFactory.CreateFromMethod(
152153
this.EndAsync,
153154
functionName: "end_task_with_summary",
154-
description: "End the task with a summary when there is no further action to take.");
155+
description: "Complete the task with a summary when no further requests are given.");
155156

156157
foreach (KeyValuePair<string, (AgentType _, string Description)> handoff in this._handoffs)
157158
{

0 commit comments

Comments
 (0)