Skip to content

Commit ce43da3

Browse files
authored
.NET Workflows - Sample and Package Update (microsoft#1759)
* Update microsoft#1 * Sample comments * Formatting * Whitespace
1 parent 22c8fb7 commit ce43da3

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎dotnet/Directory.Packages.props‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<PackageVersion Include="Aspire.Microsoft.Azure.Cosmos" Version="$(AspireAppHostSdkVersion)" />
1818
<PackageVersion Include="CommunityToolkit.Aspire.OllamaSharp" Version="9.8.0" />
1919
<!-- Azure.* -->
20-
<PackageVersion Include="Azure.AI.Agents.Persistent" Version="1.2.0-beta.6" />
20+
<PackageVersion Include="Azure.AI.Agents.Persistent" Version="1.2.0-beta.7" />
2121
<PackageVersion Include="Azure.AI.OpenAI" Version="2.5.0-beta.1" />
2222
<PackageVersion Include="Azure.Identity" Version="1.17.0" />
2323
<PackageVersion Include="Azure.Monitor.OpenTelemetry.Exporter" Version="1.4.0" />

‎dotnet/samples/GettingStarted/Workflows/Declarative/ExecuteWorkflow/Program.cs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ private Program(string workflowFile, string? workflowInput)
184184

185185
private async Task<ExternalRequest?> MonitorAndDisposeWorkflowRunAsync(Checkpointed<StreamingRun> run, object? response = null)
186186
{
187+
// Always dispose the run when done.
187188
await using IAsyncDisposable disposeRun = run;
188189

189190
bool hasStreamed = false;
@@ -231,7 +232,7 @@ private Program(string workflowFile, string? workflowInput)
231232
}
232233
else
233234
{
234-
await run.Run.DisposeAsync();
235+
// Yield to handle the external request
235236
return requestInfo.Request;
236237
}
237238
break;
@@ -326,7 +327,7 @@ private Program(string workflowFile, string? workflowInput)
326327
}
327328
}
328329

329-
return default;
330+
return null; // No request to handle
330331
}
331332

332333
/// <summary>

‎workflow-samples/DeepResearch.yaml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#
2-
# This workflow demonstrates a multi-agent orchestrator that attempts to address complex user requests.
2+
# This workflow coordinates multiple agents in order to address complex user requests
3+
# according to the "Magentic" orchestration pattern introduced by AutoGen.
34
#
45
# For this workflow, several agents used, each with a prompt specific to their role:
56
#

0 commit comments

Comments
 (0)