FunctionCallingConfig

classFunctionCallingConfig


The configuration that specifies the function calling behavior.

See the static methods in thecompanion object for the list of available behaviors.

Summary

Public companion functions

FunctionCallingConfig
any(allowedFunctionNames: List<String>?)

The model always predicts a provided function call to answer every query.

FunctionCallingConfig

The default behavior for function calling.

FunctionCallingConfig

The model will never predict a function call to answer a query.

Public companion functions

any

fun any(allowedFunctionNames: List<String>? = null): FunctionCallingConfig

The model always predicts a provided function call to answer every query.

auto

fun auto(): FunctionCallingConfig

The default behavior for function calling. The model calls functions to answer queries at its discretion.

none

fun none(): FunctionCallingConfig

The model will never predict a function call to answer a query. This can also be achieved by not passing any tools to the model.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-21 UTC.