mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
19 lines
957 B
Plaintext
19 lines
957 B
Plaintext
<#@ template language="C#" inherits="ActionTemplate" visibility="internal" linePragmas="false" #>
|
|
<#@ output extension=".cs" #>
|
|
<#@ assembly name="System.Core" #>
|
|
<#@ import namespace="Microsoft.Agents.AI.Workflows.Declarative.Extensions" #>
|
|
<#@ import namespace="Microsoft.Agents.ObjectModel" #>
|
|
<#@ include file="Snippets/AssignVariableTemplate.tt" once="true" #>
|
|
<#@ include file="Snippets/FormatMessageTemplate.tt" once="true" #>
|
|
/// <summary>
|
|
/// Assigns an evaluated message template to the "<#= this.Model.Variable #>" variable.
|
|
/// </summary>
|
|
internal sealed class <#= this.Name #>Executor(FormulaSession session) : ActionExecutor(id: "<#= this.Id #>", session)
|
|
{
|
|
protected override async ValueTask<object?> ExecuteAsync(IWorkflowContext context, CancellationToken cancellationToken)
|
|
{<#
|
|
EvaluateMessageTemplate(this.Model.Value, "textValue");
|
|
AssignVariable(this.Variable, "textValue"); #>
|
|
return default;
|
|
}
|
|
} |