Class FunctionCallingConfig.Builder
- Enclosing class:
- FunctionCallingConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowedFunctionNames(String... allowedFunctionNames) Setter for allowedFunctionNames.abstract FunctionCallingConfig.BuilderallowedFunctionNames(List<String> allowedFunctionNames) Setter for allowedFunctionNames.abstract FunctionCallingConfigbuild()Clears the value of allowedFunctionNames field.Clears the value of mode field.Clears the value of streamFunctionCallArguments field.abstract FunctionCallingConfig.BuilderSetter for mode.mode(FunctionCallingConfigMode.Known knownType) Setter for mode given a known enum.Setter for mode given a string.abstract FunctionCallingConfig.BuilderstreamFunctionCallArguments(boolean streamFunctionCallArguments) Setter for streamFunctionCallArguments.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
mode
Setter for mode.mode: Optional. Function calling mode.
-
clearMode
Clears the value of mode field. -
mode
@CanIgnoreReturnValue public FunctionCallingConfig.Builder mode(FunctionCallingConfigMode.Known knownType) Setter for mode given a known enum.mode: Optional. Function calling mode.
-
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
@CanIgnoreReturnValue 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.
-
clearAllowedFunctionNames
Clears the value of allowedFunctionNames field. -
streamFunctionCallArguments
public abstract FunctionCallingConfig.Builder streamFunctionCallArguments(boolean streamFunctionCallArguments) Setter for streamFunctionCallArguments.streamFunctionCallArguments: Optional. When set to true, arguments of a single function call will be streamed out in multiple parts/contents/responses. Partial parameter results will be returned in the [FunctionCall.partial_args] field. This field is not supported in Gemini API.
-
clearStreamFunctionCallArguments
Clears the value of streamFunctionCallArguments field. -
build
-