Udostępnij za pośrednictwem


AgentBuilder Class

Definition

Fluent builder for initializing an IAgent instance.

public class AgentBuilder
type AgentBuilder = class
Public Class AgentBuilder
Inheritance
AgentBuilder

Constructors

AgentBuilder()

Initializes a new instance of the AgentBuilder class.

Methods

BuildAsync(CancellationToken)

Create a IAgent instance.

FromTemplate(String)

Create a new agent from a yaml formatted string.

FromTemplatePath(String)

Create a new agent from a yaml template.

GetAsync(String, CancellationToken)

Create a IAgent instance.

GetAzureOpenAIAgentsAsync(String, String, String)

Retrieve defined agents from an Azure OpenAI endpoint.

GetOpenAIAgentsAsync(String)

Retrieve defined agents from OpenAI services.

WithAzureOpenAIChatCompletion(String, String, String, String)

Define the OpenAI chat completion service (required).

WithCodeInterpreter()

Enable the code-interpreter tool with this agent.

WithDescription(String)

Define the agent description (optional).

WithFile(String)

Associate an uploaded file with the agent, by identifier.

WithFiles(String[])

Associate uploaded files with the agent, by identifier.

WithHttpClient(HttpClient)

Provide an httpclient (optional).

WithInstructions(String)

Define the agent instructions (optional).

WithMetadata(IDictionary<String,Object>)

Define the agent metadata (optional).

WithMetadata(String, Object)

Define the agent metadata (optional).

WithName(String)

Define the agent name (optional).

WithOpenAIChatCompletion(String, String)

Define the OpenAI chat completion service (required).

WithPlugin(KernelPlugin)

Define functions associated with agent instance (optional).

WithPlugins(IEnumerable<KernelPlugin>)

Define functions associated with agent instance (optional).

WithRetrieval(String[])

Enable the retrieval tool with this agent.

Applies to