From 6fbb4dcb87f0cd7dec32188073bb305688286f97 Mon Sep 17 00:00:00 2001 From: Shyju Krishnankutty Date: Thu, 15 Jan 2026 11:43:28 -0800 Subject: [PATCH] Minor cleanups --- dotnet/nuget.config | 2 +- dotnet/samples/AzureFunctions/09_Workflow/demo.http | 6 +++--- .../10_WorkflowConcurrent/10_WorkflowConcurrent.csproj | 6 +++++- .../10_WorkflowConcurrent/ConcurrentStartExecutor.cs | 2 +- .../AzureFunctions/10_WorkflowConcurrent/Program.cs | 10 ++++------ .../AzureFunctions/10_WorkflowConcurrent/demo.http | 2 +- .../11_WorkflowWithDifferentTypes.csproj | 6 +++++- .../11_WorkflowWithDifferentTypes/Program.cs | 2 +- 8 files changed, 21 insertions(+), 15 deletions(-) diff --git a/dotnet/nuget.config b/dotnet/nuget.config index 49f96479ca..ca4534f6c8 100644 --- a/dotnet/nuget.config +++ b/dotnet/nuget.config @@ -3,7 +3,7 @@ - + diff --git a/dotnet/samples/AzureFunctions/09_Workflow/demo.http b/dotnet/samples/AzureFunctions/09_Workflow/demo.http index 6408795c5a..a3f7d87235 100644 --- a/dotnet/samples/AzureFunctions/09_Workflow/demo.http +++ b/dotnet/samples/AzureFunctions/09_Workflow/demo.http @@ -1,14 +1,14 @@ # Default endpoint address for local testing @authority=http://localhost:7071 -### Prompt the agent +### Start the workflow POST {{authority}}/api/workflows/HandleSurveyResponse/run Content-Type: text/plain Rating: 10. Why was I charged $99 when my plan should be $49? I need a refund for the overcharge - +### Start the workflow with another bug report input. POST {{authority}}/api/workflows/HandleSurveyResponse/run Content-Type: text/plain -Rating: 10. Why was I charged $99 when my plan should be $49? I need a refund for the overcharge \ No newline at end of file +Rating: 3. The app throws an InvalidOperationException when starting up. \ No newline at end of file diff --git a/dotnet/samples/AzureFunctions/10_WorkflowConcurrent/10_WorkflowConcurrent.csproj b/dotnet/samples/AzureFunctions/10_WorkflowConcurrent/10_WorkflowConcurrent.csproj index ec1dca7683..4872f05930 100644 --- a/dotnet/samples/AzureFunctions/10_WorkflowConcurrent/10_WorkflowConcurrent.csproj +++ b/dotnet/samples/AzureFunctions/10_WorkflowConcurrent/10_WorkflowConcurrent.csproj @@ -1,4 +1,4 @@ - + net10.0 v4 @@ -14,6 +14,10 @@ + + + + diff --git a/dotnet/samples/AzureFunctions/10_WorkflowConcurrent/ConcurrentStartExecutor.cs b/dotnet/samples/AzureFunctions/10_WorkflowConcurrent/ConcurrentStartExecutor.cs index 2454ee82dd..de233d60a6 100644 --- a/dotnet/samples/AzureFunctions/10_WorkflowConcurrent/ConcurrentStartExecutor.cs +++ b/dotnet/samples/AzureFunctions/10_WorkflowConcurrent/ConcurrentStartExecutor.cs @@ -19,7 +19,7 @@ internal sealed class ConcurrentStartExecutor() : Executor("Conc } } -internal sealed class ConcurrentAggregationExecutor() : Executor("ConcurrentAggregationExecutor") +internal sealed class ResultAggregationExecutor() : Executor("ResultAggregationExecutor") { /// /// Handles incoming messages from the agents and aggregates their responses. diff --git a/dotnet/samples/AzureFunctions/10_WorkflowConcurrent/Program.cs b/dotnet/samples/AzureFunctions/10_WorkflowConcurrent/Program.cs index 304ffd9dea..004b9c9553 100644 --- a/dotnet/samples/AzureFunctions/10_WorkflowConcurrent/Program.cs +++ b/dotnet/samples/AzureFunctions/10_WorkflowConcurrent/Program.cs @@ -28,24 +28,22 @@ AIAgent physicist = client.GetChatClient(deploymentName).CreateAIAgent("You are AIAgent chemist = client.GetChatClient(deploymentName).CreateAIAgent("You are an expert in chemistry. You answer questions from a chemistry perspective.", "Chemist"); var startExecutor = new ConcurrentStartExecutor(); -var aggregationExecutor = new ConcurrentAggregationExecutor(); +var aggregationExecutor = new ResultAggregationExecutor(); // Build the workflow by adding executors and connecting them var workflow = new WorkflowBuilder(startExecutor) .WithName("FanOutWorkflow") .AddFanOutEdge(startExecutor, [physicist, chemist]) .AddFanInEdge([physicist, chemist], aggregationExecutor) - .WithOutputFrom(aggregationExecutor) .Build(); // Configure the function app to host AI agents and workflows in a unified way. // This will automatically generate HTTP API endpoints for agents and workflows. -var functionBuilder = FunctionsApplication.CreateBuilder(args); -functionBuilder + +FunctionsApplication.CreateBuilder(args) .ConfigureFunctionsWebApplication() .ConfigureDurableOptions(options => { // Configure workflows options.Workflows.AddWorkflow(workflow); -}); -functionBuilder.Build().Run(); +}).Build().Run(); diff --git a/dotnet/samples/AzureFunctions/10_WorkflowConcurrent/demo.http b/dotnet/samples/AzureFunctions/10_WorkflowConcurrent/demo.http index 618a1c5483..92027a13bf 100644 --- a/dotnet/samples/AzureFunctions/10_WorkflowConcurrent/demo.http +++ b/dotnet/samples/AzureFunctions/10_WorkflowConcurrent/demo.http @@ -1,7 +1,7 @@ # Default endpoint address for local testing @authority=http://localhost:7071 -### Prompt the agent +### Start the workflow POST {{authority}}/api/workflows/FanOutWorkflow/run Content-Type: text/plain diff --git a/dotnet/samples/AzureFunctions/11_WorkflowWithDifferentTypes/11_WorkflowWithDifferentTypes.csproj b/dotnet/samples/AzureFunctions/11_WorkflowWithDifferentTypes/11_WorkflowWithDifferentTypes.csproj index ec1dca7683..4872f05930 100644 --- a/dotnet/samples/AzureFunctions/11_WorkflowWithDifferentTypes/11_WorkflowWithDifferentTypes.csproj +++ b/dotnet/samples/AzureFunctions/11_WorkflowWithDifferentTypes/11_WorkflowWithDifferentTypes.csproj @@ -1,4 +1,4 @@ - + net10.0 v4 @@ -14,6 +14,10 @@ + + + + diff --git a/dotnet/samples/AzureFunctions/11_WorkflowWithDifferentTypes/Program.cs b/dotnet/samples/AzureFunctions/11_WorkflowWithDifferentTypes/Program.cs index 183dd6d2dd..a2a70a2a20 100644 --- a/dotnet/samples/AzureFunctions/11_WorkflowWithDifferentTypes/Program.cs +++ b/dotnet/samples/AzureFunctions/11_WorkflowWithDifferentTypes/Program.cs @@ -15,7 +15,7 @@ using SingleAgent; // Create the executors with different input/output types OrderIdParserExecutor orderIdParser = new(); // string → int -OrderLookupExecutor orderLookup = new(); // int → OrderDetails +OrderLookupExecutor orderLookup = new(); // int → OrderDetails POCO OrderSummaryExecutor orderSummary = new(); // OrderDetails → string // Build the workflow: Parse → Lookup → Summarize