Partager via


FunctionChoiceBehavior.Auto Method

Definition

Gets an instance of the FunctionChoiceBehavior that provides either all of the Kernel's plugins' functions to the AI model to call or specified ones. This behavior allows the model to decide whether to call the functions and, if so, which ones to call.

public static Microsoft.SemanticKernel.FunctionChoiceBehavior Auto (System.Collections.Generic.IEnumerable<Microsoft.SemanticKernel.KernelFunction>? functions = default, bool autoInvoke = true, Microsoft.SemanticKernel.FunctionChoiceBehaviorOptions? options = default);
static member Auto : seq<Microsoft.SemanticKernel.KernelFunction> * bool * Microsoft.SemanticKernel.FunctionChoiceBehaviorOptions -> Microsoft.SemanticKernel.FunctionChoiceBehavior
Public Shared Function Auto (Optional functions As IEnumerable(Of KernelFunction) = Nothing, Optional autoInvoke As Boolean = true, Optional options As FunctionChoiceBehaviorOptions = Nothing) As FunctionChoiceBehavior

Parameters

functions
IEnumerable<KernelFunction>

Functions to provide to the model. If null, all of the Kernel's plugins' functions are provided to the model. If empty, no functions are provided to the model, which is equivalent to disabling function calling.

autoInvoke
Boolean

Indicates whether the functions should be automatically invoked by AI connectors.

options
FunctionChoiceBehaviorOptions

The behavior options.

Returns

An instance of one of the FunctionChoiceBehavior.

Applies to