Jaa


FunctionInvokingChatClientBuilderExtensions.UseFunctionInvocation Method

Definition

Enables automatic function call invocation on the chat pipeline.

public static Microsoft.Extensions.AI.ChatClientBuilder UseFunctionInvocation (this Microsoft.Extensions.AI.ChatClientBuilder builder, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default, Action<Microsoft.Extensions.AI.FunctionInvokingChatClient>? configure = default);
static member UseFunctionInvocation : Microsoft.Extensions.AI.ChatClientBuilder * Microsoft.Extensions.Logging.ILoggerFactory * Action<Microsoft.Extensions.AI.FunctionInvokingChatClient> -> Microsoft.Extensions.AI.ChatClientBuilder
<Extension()>
Public Function UseFunctionInvocation (builder As ChatClientBuilder, Optional loggerFactory As ILoggerFactory = Nothing, Optional configure As Action(Of FunctionInvokingChatClient) = Nothing) As ChatClientBuilder

Parameters

builder
ChatClientBuilder

The ChatClientBuilder being used to build the chat pipeline.

loggerFactory
ILoggerFactory

An optional ILoggerFactory to use to create a logger for logging function invocations.

configure
Action<FunctionInvokingChatClient>

An optional callback that can be used to configure the FunctionInvokingChatClient instance.

Returns

The supplied builder.

Remarks

This works by adding an instance of FunctionInvokingChatClient with default options.

Applies to