Class FunctionCallingConfig.Builder

java.lang.Object
com.google.genai.types.FunctionCallingConfig.Builder
Enclosing class:
FunctionCallingConfig

public abstract static class FunctionCallingConfig.Builder extends Object
Builder for FunctionCallingConfig.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • mode

      Setter for mode.

      mode: Optional. Function calling mode.

    • mode

      @CanIgnoreReturnValue public FunctionCallingConfig.Builder mode(FunctionCallingConfigMode.Known knownType)
      Setter for mode given a known enum.

      mode: Optional. Function calling mode.

    • mode

      @CanIgnoreReturnValue public FunctionCallingConfig.Builder mode(String mode)
      Setter for mode given a string.

      mode: Optional. Function calling mode.

    • allowedFunctionNames

      public abstract FunctionCallingConfig.Builder allowedFunctionNames(List<String> allowedFunctionNames)
      Setter for allowedFunctionNames.

      allowedFunctionNames: 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.

    • allowedFunctionNames

      public FunctionCallingConfig.Builder allowedFunctionNames(String... allowedFunctionNames)
      Setter for allowedFunctionNames.

      allowedFunctionNames: 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.

    • build

      public abstract FunctionCallingConfig build()