Partager via


ToolCallBehavior.EnableFunctions Method

Definition

Gets an instance that will provide the specified list of functions to the model.

public static Microsoft.SemanticKernel.Connectors.OpenAI.ToolCallBehavior EnableFunctions (System.Collections.Generic.IEnumerable<Microsoft.SemanticKernel.Connectors.OpenAI.OpenAIFunction> functions, bool autoInvoke = false);
static member EnableFunctions : seq<Microsoft.SemanticKernel.Connectors.OpenAI.OpenAIFunction> * bool -> Microsoft.SemanticKernel.Connectors.OpenAI.ToolCallBehavior
Public Shared Function EnableFunctions (functions As IEnumerable(Of OpenAIFunction), Optional autoInvoke As Boolean = false) As ToolCallBehavior

Parameters

functions
IEnumerable<OpenAIFunction>

The functions that should be made available to the model.

autoInvoke
Boolean

true to attempt to automatically handle function call requests; otherwise, false.

Returns

The ToolCallBehavior that may be set into ToolCallBehavior to indicate that the specified functions should be made available to the model.

Applies to