ResponsesServer.Run Method

Definition

Overloads

Name Description
Run(Func<IServiceProvider,ResponseHandler>, String[], Action<AgentHostBuilder>)

Builds and runs a Responses protocol server using a factory delegate for handler construction. Use this when you need full control over how the handler is created.

Run<THandler>(String[], Action<AgentHostBuilder>)

Builds and runs a Responses protocol server using the specified handler type. This is the fastest path to a working server — one line of code.

Run(Func<IServiceProvider,ResponseHandler>, String[], Action<AgentHostBuilder>)

Source:
ResponsesServer.cs

Builds and runs a Responses protocol server using a factory delegate for handler construction. Use this when you need full control over how the handler is created.

public static void Run(Func<IServiceProvider,Azure.AI.AgentServer.Responses.ResponseHandler> factory, string[]? args = default, Action<Azure.AI.AgentServer.Core.AgentHostBuilder>? configure = default);
static member Run : Func<IServiceProvider, Azure.AI.AgentServer.Responses.ResponseHandler> * string[] * Action<Azure.AI.AgentServer.Core.AgentHostBuilder> -> unit
Public Shared Sub Run (factory As Func(Of IServiceProvider, ResponseHandler), Optional args As String() = Nothing, Optional configure As Action(Of AgentHostBuilder) = Nothing)

Parameters

factory
Func<IServiceProvider,ResponseHandler>

A factory that receives the service provider and returns a ResponseHandler.

args
String[]

Optional command-line arguments.

configure
Action<AgentHostBuilder>

Optional callback to further configure the builder before running.

Applies to

Run<THandler>(String[], Action<AgentHostBuilder>)

Source:
ResponsesServer.cs

Builds and runs a Responses protocol server using the specified handler type. This is the fastest path to a working server — one line of code.

public static void Run<THandler>(string[]? args = default, Action<Azure.AI.AgentServer.Core.AgentHostBuilder>? configure = default) where THandler : Azure.AI.AgentServer.Responses.ResponseHandler;
static member Run : string[] * Action<Azure.AI.AgentServer.Core.AgentHostBuilder> -> unit (requires 'Handler :> Azure.AI.AgentServer.Responses.ResponseHandler)
Public Shared Sub Run(Of THandler As ResponseHandler) (Optional args As String() = Nothing, Optional configure As Action(Of AgentHostBuilder) = Nothing)

Type Parameters

THandler

The ResponseHandler implementation to handle responses.

Parameters

args
String[]

Optional command-line arguments.

configure
Action<AgentHostBuilder>

Optional callback to further configure the builder before running.

Applies to