Fix/03.dotnet agent framework workflow ghmodel concurrent.ipynb - #707
Conversation
|
👋 Thanks for contributing Marietta (@marietta-a)! We will review the pull request and get back to you soon. |
There was a problem hiding this comment.
Pull request overview
This PR updates the Lesson 08 multi-agent concurrent workflow .NET notebook (and its companion .cs sample) to align with the updated workflow/event-handling APIs referenced in PR #684.
Changes:
- Updated NuGet package references in the notebook to use newer major versions / version wildcards.
- Updated agent creation to use
GetChatClient(...).AsIChatClient().AsAIAgent(...). - Refactored the concurrent workflow executors to the newer attribute-based executor model (
[MessageHandler],[SendsMessage],[YieldsOutput]) and moved aggregation toOnMessageDeliveryFinishedAsync.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| 08-multi-agent/code_samples/workflows-agent-framework/dotNET/03.dotnet-agent-framework-workflow-ghmodel-concurrent.ipynb | Updates packages + executor implementation to match the newer concurrent workflow pattern. |
| 08-multi-agent/code_samples/workflows-agent-framework/dotNET/03.dotnet-agent-framework-workflow-ghmodel-concurrent.cs | Updates agent creation calls and removes now-unneeded usings to match the notebook’s updated agent creation approach. |
Suppressed comments (3)
08-multi-agent/code_samples/workflows-agent-framework/dotNET/03.dotnet-agent-framework-workflow-ghmodel-concurrent.ipynb:231
- This "Installed Packages" output lists
OpenTelemetry.Api, 1.*instead of the resolved concrete version, which is inconsistent with the other notebooks and can confuse readers. Prefer re-running to capture the resolved version or clearing the output.
"outputs": [
{
"data": {
"text/html": [
"<div><div></div><div></div><div><strong>Installed Packages</strong><ul><li><span>Azure.Identity, 1.15.0</span></li><li><span>OpenTelemetry.Api, 1.*</span></li><li><span>System.Linq.Async, 6.0.3</span></li></ul></div></div>"
08-multi-agent/code_samples/workflows-agent-framework/dotNET/03.dotnet-agent-framework-workflow-ghmodel-concurrent.ipynb:260
- This "Installed Packages" output lists
Microsoft.Agents.AI.Workflows, 1.*rather than the resolved version. To avoid misleading readers, re-run the cell to capture the resolved version or clear the output.
"outputs": [
{
"data": {
"text/html": [
"<div><div></div><div></div><div><strong>Installed Packages</strong><ul><li><span>Microsoft.Agents.AI.Workflows, 1.*</span></li></ul></div></div>"
08-multi-agent/code_samples/workflows-agent-framework/dotNET/03.dotnet-agent-framework-workflow-ghmodel-concurrent.ipynb:287
- This "Installed Packages" output lists
Microsoft.Agents.AI.OpenAI, 1.*-*rather than the resolved concrete version. Consider re-running to capture the resolved version or clearing the output so the notebook doesn’t assert an impossible installed version string.
"outputs": [
{
"data": {
"text/html": [
"<div><div></div><div></div><div><strong>Installed Packages</strong><ul><li><span>Microsoft.Agents.AI.OpenAI, 1.*-*</span></li></ul></div></div>"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| " StringBuilder resultBuilder = new();\n", | ||
| " foreach (ChatMessage m in this._messages)\n", | ||
| " {\n", | ||
| " var formattedMessages = string.Join(Environment.NewLine, this._messages.Select(m => $\"{m.AuthorName}: {m.Text}\"));\n", | ||
| " await context.YieldOutputAsync(formattedMessages);\n", | ||
| " return context.YieldOutputAsync(formattedMessages);\n", |
| "outputs": [ | ||
| { | ||
| "data": { | ||
| "text/html": [ | ||
| "<div><div></div><div></div><div><strong>Installed Packages</strong><ul><li><span>Microsoft.Extensions.AI, 9.9.1</span></li></ul></div></div>" | ||
| "<div><div></div><div></div><div><strong>Installed Packages</strong><ul><li><span>Microsoft.Extensions.AI, 10.*</span></li></ul></div></div>" |
This PR aligns the notebook with the updated concurrent workflow in #684