ToolConfig

Tool config. This config is shared for all tools provided in the request.

Fields
functionCallingConfig object (FunctionCallingConfig)

Optional. Function calling config.

JSON representation
{
  "functionCallingConfig": {
    object (FunctionCallingConfig)
  }
}

FunctionCallingConfig

Function calling config.

Fields
mode enum (Mode)

Optional. Function calling mode.

allowedFunctionNames[] string

Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided.

JSON representation
{
  "mode": enum (Mode),
  "allowedFunctionNames": [
    string
  ]
}

Mode

Function calling mode.

Enums
MODE_UNSPECIFIED Unspecified function calling mode. This value should not be used.
AUTO Default model behavior, model decides to predict either function calls or natural language response.
ANY Model is constrained to always predicting function calls only. If "allowedFunctionNames" are set, the predicted function calls will be limited to any one of "allowedFunctionNames", else the predicted function calls will be any one of the provided "functionDeclarations".
NONE Model will not predict any function calls. Model behavior is same as when not passing any function declarations.