-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
.NETagent orchestrationIssues related to agent orchestrationIssues related to agent orchestrationv1.0Features being tracked for the version 1.0 GAFeatures being tracked for the version 1.0 GAworkflowsRelated to Workflows in agent-frameworkRelated to Workflows in agent-framework
Description
With the following code, an error is received:
System.InvalidOperationException: 'The workflow factory returned workflow with name '', but the expected name is 'story-creation-workflow'.'
builder.Services.AddChatClient(chatClient);
builder.AddAIAgent("writer", "You write short stories about the specific topic.");
builder.AddAIAgent("editor", "You edit short stories to improve grammar and style.");
builder.AddWorkflow("story-creation-workflow", (sp, name) =>
{
var writer = sp.GetRequiredKeyedService<AIAgent>("writer");
var editor = sp.GetRequiredKeyedService<AIAgent>("editor");
var groupChatBuilder = AgentWorkflowBuilder.CreateGroupChatBuilderWith(
agents => new RoundRobinGroupChatManager(
agents,
(manager, messages, cancellationToken) => ValueTask.FromResult(messages.LastOrDefault()?.AuthorName == editor.Name)
)
{ MaximumIterationCount = 4 }
);
return groupChatBuilder.AddParticipants(writer, editor).Build();
});I cannot find a way to use CreateGroupChatBuilderWith() or otherwise create a group chat workflow with a name for it to be added as a workflow.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
.NETagent orchestrationIssues related to agent orchestrationIssues related to agent orchestrationv1.0Features being tracked for the version 1.0 GAFeatures being tracked for the version 1.0 GAworkflowsRelated to Workflows in agent-frameworkRelated to Workflows in agent-framework
Type
Projects
Status
No status