FunctionCallingConfig

public final class FunctionCallingConfig


The configuration that specifies the function calling behavior.

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

Summary

Nested types

Public methods

static final @NonNull FunctionCallingConfig
any(List<@NonNull String> allowedFunctionNames)

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

static final @NonNull FunctionCallingConfig

The default behavior for function calling.

static final @NonNull FunctionCallingConfig

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

Public methods

any

public static final @NonNull FunctionCallingConfig any(List<@NonNull String> allowedFunctionNames)

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

auto

public static final @NonNull FunctionCallingConfig auto()

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

none

public static final @NonNull FunctionCallingConfig none()

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.