DeclarativeWorkflowBuilder.Build Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| Build<TInput>(TextReader, DeclarativeWorkflowOptions, Func<TInput,ChatMessage>) |
Builds a workflow from the provided YAML definition. |
| Build<TInput>(String, DeclarativeWorkflowOptions, Func<TInput,ChatMessage>) |
Builder for converting a Foundry workflow object-model YAML definition into a process. |
Build<TInput>(TextReader, DeclarativeWorkflowOptions, Func<TInput,ChatMessage>)
Builds a workflow from the provided YAML definition.
public static Microsoft.Agents.AI.Workflows.Workflow Build<TInput>(System.IO.TextReader yamlReader, Microsoft.Agents.AI.Workflows.Declarative.DeclarativeWorkflowOptions options, Func<TInput,Microsoft.Extensions.AI.ChatMessage>? inputTransform = default);
static member Build : System.IO.TextReader * Microsoft.Agents.AI.Workflows.Declarative.DeclarativeWorkflowOptions * Func<'Input, Microsoft.Extensions.AI.ChatMessage> -> Microsoft.Agents.AI.Workflows.Workflow
Public Shared Function Build(Of TInput) (yamlReader As TextReader, options As DeclarativeWorkflowOptions, Optional inputTransform As Func(Of TInput, ChatMessage) = Nothing) As Workflow
Type Parameters
- TInput
The type of the input message
Parameters
- yamlReader
- TextReader
The reader that provides the workflow object model YAML.
- options
- DeclarativeWorkflowOptions
Configuration options for workflow execution.
- inputTransform
- Func<TInput,ChatMessage>
An optional function to transform the input message into a ChatMessage.
Returns
The Workflow that corresponds with the YAML object model.
Applies to
Build<TInput>(String, DeclarativeWorkflowOptions, Func<TInput,ChatMessage>)
Builder for converting a Foundry workflow object-model YAML definition into a process.
public static Microsoft.Agents.AI.Workflows.Workflow Build<TInput>(string workflowFile, Microsoft.Agents.AI.Workflows.Declarative.DeclarativeWorkflowOptions options, Func<TInput,Microsoft.Extensions.AI.ChatMessage>? inputTransform = default);
static member Build : string * Microsoft.Agents.AI.Workflows.Declarative.DeclarativeWorkflowOptions * Func<'Input, Microsoft.Extensions.AI.ChatMessage> -> Microsoft.Agents.AI.Workflows.Workflow
Public Shared Function Build(Of TInput) (workflowFile As String, options As DeclarativeWorkflowOptions, Optional inputTransform As Func(Of TInput, ChatMessage) = Nothing) As Workflow
Type Parameters
- TInput
The type of the input message
Parameters
- workflowFile
- String
The path to the workflow.
- options
- DeclarativeWorkflowOptions
Configuration options for workflow execution.
- inputTransform
- Func<TInput,ChatMessage>
An optional function to transform the input message into a ChatMessage.