mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.NET Workflows -Fix Declarative Workflow Tests (#1065)
* Fixed * Restore generated workflow * Project * Fine tune * Update baseline * Adjust test-case
This commit is contained in:
+4
-1
@@ -12,7 +12,10 @@ internal sealed class <#= this.Name #>Executor(FormulaSession session, WorkflowA
|
||||
protected override async ValueTask<object?> ExecuteAsync(IWorkflowContext context, CancellationToken cancellationToken)
|
||||
{<#
|
||||
EvaluateStringExpression(this.Model.ConversationId, "conversationId", isNullable: true); #>
|
||||
ArgumentNullException.ThrowIfNull(conversationId, nameof(conversationId));
|
||||
if (string.IsNullOrWhiteSpace(conversationId))
|
||||
{
|
||||
throw new DeclarativeActionException($"Conversation identifier must be defined: {this.Id}");
|
||||
}
|
||||
ChatMessage newMessage = new(ChatRole.<#= FormatEnum(this.Model.Role, RoleMap) #>, [.. this.GetContentAsync(context).ToEnumerable()]) { AdditionalProperties = this.GetMetadata() };
|
||||
await agentProvider.CreateMessageAsync(conversationId, newMessage, cancellationToken).ConfigureAwait(false);<#
|
||||
AssignVariable(this.Message, "newMessage");
|
||||
|
||||
Reference in New Issue
Block a user