GeminiPromptExecutionSettings.ToolCallBehavior Property

Definition

Gets or sets the behavior for how tool calls are handled.

public Microsoft.SemanticKernel.Connectors.Google.GeminiToolCallBehavior? ToolCallBehavior { get; set; }
member this.ToolCallBehavior : Microsoft.SemanticKernel.Connectors.Google.GeminiToolCallBehavior with get, set
Public Property ToolCallBehavior As GeminiToolCallBehavior

Property Value

Remarks

  • To disable all tool calling, set the property to null (the default).
  • To allow the model to request one of any number of functions, set the property to an instance returned from EnableFunctions(IEnumerable<GeminiFunction>, Boolean), called with a list of the functions available.
  • To allow the model to request one of any of the functions in the supplied Kernel, set the property to EnableKernelFunctions if the client should simply send the information about the functions and not handle the response in any special manner, or AutoInvokeKernelFunctions if the client should attempt to automatically invoke the function and send the result back to the service.
For all options where an instance is provided, auto-invoke behavior may be selected. If the service sends a request for a function call, if auto-invoke has been requested, the client will attempt to resolve that function from the functions available in the Kernel, and if found, rather than returning the response back to the caller, it will handle the request automatically, invoking the function, and sending back the result. The intermediate messages will be retained in the ChatHistory if an instance was provided.

Applies to