Share via


ToolCallBehavior.RequireFunction(OpenAIFunction, Boolean) Method

Definition

Gets an instance that will request the model to use the specified function.

public static Microsoft.SemanticKernel.Connectors.OpenAI.ToolCallBehavior RequireFunction (Microsoft.SemanticKernel.Connectors.OpenAI.OpenAIFunction function, bool autoInvoke = false);
static member RequireFunction : Microsoft.SemanticKernel.Connectors.OpenAI.OpenAIFunction * bool -> Microsoft.SemanticKernel.Connectors.OpenAI.ToolCallBehavior
Public Shared Function RequireFunction (function As OpenAIFunction, Optional autoInvoke As Boolean = false) As ToolCallBehavior

Parameters

function
OpenAIFunction

The function the model should request to use.

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 function should be requested by the model.

Applies to