mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Merge branch 'main' into feature-featurecollections-messagestore
This commit is contained in:
+3
-3
@@ -81,8 +81,8 @@ internal static class Step8EntryPoint
|
||||
{
|
||||
internal sealed class State
|
||||
{
|
||||
public List<TextProcessingResult> Results { get; } = new();
|
||||
public HashSet<string> PendingTaskIds { get; } = new();
|
||||
public List<TextProcessingResult> Results { get; } = [];
|
||||
public HashSet<string> PendingTaskIds { get; } = [];
|
||||
|
||||
public bool IsComplete => this.PendingTaskIds.Count == 0;
|
||||
|
||||
@@ -102,7 +102,7 @@ internal static class Step8EntryPoint
|
||||
|
||||
async ValueTask<State?> QueueProcessingTasksAsync(State state, IWorkflowContext context, CancellationToken cancellationToken)
|
||||
{
|
||||
foreach (TextProcessingRequest request in texts.Select((string value, int index) => new TextProcessingRequest(Text: value, TaskId: $"Task{index}")))
|
||||
foreach (TextProcessingRequest request in texts.Select((value, index) => new TextProcessingRequest(Text: value, TaskId: $"Task{index}")))
|
||||
{
|
||||
state.PendingTaskIds.Add(request.TaskId);
|
||||
await context.SendMessageAsync(request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ internal static class Step9EntryPoint
|
||||
|
||||
public static WorkflowBuilder AddExternalRequest<TRequest, TResponse>(this WorkflowBuilder builder, ExecutorBinding source, out RequestPort<TRequest, TResponse> inputPort, string? id = null)
|
||||
{
|
||||
id = id ?? $"{source.Id}.Requests[{typeof(TRequest).Name}=>{typeof(TResponse).Name}]";
|
||||
id ??= $"{source.Id}.Requests[{typeof(TRequest).Name}=>{typeof(TResponse).Name}]";
|
||||
|
||||
inputPort = RequestPort.Create<TRequest, TResponse>(id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user