mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Update error messages per review comments in MagenticOrchestrator and MagenticWorkflowBuilder
Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/053e5ded-81e3-4e56-acf1-2a8a939a04b0 Co-authored-by: lokitoth <6936551+lokitoth@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
3d16456bbe
commit
6dc748e12e
@@ -145,7 +145,7 @@ public class MagenticWorkflowBuilder(AIAgent managerAgent)
|
||||
{
|
||||
if (this._team.Count == 0)
|
||||
{
|
||||
throw new InvalidOperationException("At least one participant must be added before building a Magentic workflow.");
|
||||
throw new InvalidOperationException("At least one participant must be added via AddParticipants() before building the workflow.");
|
||||
}
|
||||
|
||||
return this.ReduceToWorkflowBuilder().Build();
|
||||
|
||||
+2
-2
@@ -147,7 +147,7 @@ internal class MagenticOrchestrator(AIAgent managerAgent, List<AIAgent> team, Ta
|
||||
|
||||
if (this._taskContext.IsTerminated)
|
||||
{
|
||||
throw new InvalidOperationException("Magentic Orchestration has already been terminated and cannot process new messages. Please start a new session.");
|
||||
throw new InvalidOperationException("This Magentic orchestration has already terminated. To process new messages, create a new workflow instance.");
|
||||
}
|
||||
|
||||
if (response.IsApproved)
|
||||
@@ -190,7 +190,7 @@ internal class MagenticOrchestrator(AIAgent managerAgent, List<AIAgent> team, Ta
|
||||
{
|
||||
if (this._taskContext?.IsTerminated == true)
|
||||
{
|
||||
throw new InvalidOperationException("Magentic Orchestration has already been terminated and cannot process new messages. Please start a new session.");
|
||||
throw new InvalidOperationException("This Magentic orchestration has already terminated. To process new messages, create a new workflow instance.");
|
||||
}
|
||||
|
||||
if (this._taskContext == null)
|
||||
|
||||
Reference in New Issue
Block a user