YamlAgentFactoryExtensions.CreateFromYamlAsync 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.
Create a AIAgent from the given agent YAML.
public static System.Threading.Tasks.Task<Microsoft.Agents.AI.AIAgent> CreateFromYamlAsync(this Microsoft.Agents.AI.PromptAgentFactory agentFactory, string agentYaml, System.Threading.CancellationToken cancellationToken = default);
static member CreateFromYamlAsync : Microsoft.Agents.AI.PromptAgentFactory * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.AI.AIAgent>
<Extension()>
Public Function CreateFromYamlAsync (agentFactory As PromptAgentFactory, agentYaml As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AIAgent)
Parameters
- agentFactory
- PromptAgentFactory
PromptAgentFactory which will be used to create the agent.
- cancellationToken
- CancellationToken
Optional cancellation token