Package com.google.genai.types
Class FunctionCallingConfig
-
- All Implemented Interfaces:
public abstract class FunctionCallingConfig extends JsonSerializable
Function calling config.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classFunctionCallingConfig.BuilderBuilder for FunctionCallingConfig.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description FunctionCallingConfig()
-
Method Summary
Modifier and Type Method Description abstract Optional<List<String>>allowedFunctionNames()Optional. abstract Optional<FunctionCallingConfigMode>mode()Optional. abstract Optional<Boolean>streamFunctionCallArguments()Optional. static FunctionCallingConfig.Builderbuilder()Instantiates a builder for FunctionCallingConfig. abstract FunctionCallingConfig.BuildertoBuilder()Creates a builder with the same values as this instance. static FunctionCallingConfigfromJson(String jsonString)Deserializes a JSON string to a FunctionCallingConfig object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
allowedFunctionNames
abstract Optional<List<String>> 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.
-
mode
abstract Optional<FunctionCallingConfigMode> mode()
Optional. Function calling mode.
-
streamFunctionCallArguments
abstract Optional<Boolean> 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.
-
builder
static FunctionCallingConfig.Builder builder()
Instantiates a builder for FunctionCallingConfig.
-
toBuilder
abstract FunctionCallingConfig.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static FunctionCallingConfig fromJson(String jsonString)
Deserializes a JSON string to a FunctionCallingConfig object.
-
-
-
-