Compartilhar via


ConfigureOptionsChatClientBuilderExtensions.ConfigureOptions Method

Definition

Adds a callback that configures a ChatOptions to be passed to the next client in the pipeline.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::AI::ChatClientBuilder ^ ConfigureOptions(Microsoft::Extensions::AI::ChatClientBuilder ^ builder, Action<Microsoft::Extensions::AI::ChatOptions ^> ^ configure);
public static Microsoft.Extensions.AI.ChatClientBuilder ConfigureOptions (this Microsoft.Extensions.AI.ChatClientBuilder builder, Action<Microsoft.Extensions.AI.ChatOptions> configure);
static member ConfigureOptions : Microsoft.Extensions.AI.ChatClientBuilder * Action<Microsoft.Extensions.AI.ChatOptions> -> Microsoft.Extensions.AI.ChatClientBuilder
<Extension()>
Public Function ConfigureOptions (builder As ChatClientBuilder, configure As Action(Of ChatOptions)) As ChatClientBuilder

Parameters

configure
Action<ChatOptions>

The delegate to invoke to configure the ChatOptions instance. It is passed a clone of the caller-supplied ChatOptions instance (or a newly constructed instance if the caller-supplied instance is null).

Returns

The builder.

Remarks

This method can be used to set default options. The configure delegate is passed either a new instance of ChatOptions if the caller didn't supply a ChatOptions instance, or a clone (via Clone()) of the caller-supplied instance if one was supplied.

Applies to