ConfigureOptionsChatClientBuilderExtensions.ConfigureOptions 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.
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
- builder
- ChatClientBuilder
The ChatClientBuilder.
- 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.