ToolCallBehavior.RequireFunction(OpenAIFunction, Boolean) 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.
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.