Package com.google.genai.types
Class ToolConfig
-
- All Implemented Interfaces:
public abstract class ToolConfig extends JsonSerializable
Tool config.
This config is shared for all tools provided in the request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classToolConfig.BuilderBuilder for ToolConfig.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description ToolConfig()
-
Method Summary
Modifier and Type Method Description abstract Optional<RetrievalConfig>retrievalConfig()Optional. abstract Optional<FunctionCallingConfig>functionCallingConfig()Optional. abstract Optional<Boolean>includeServerSideToolInvocations()If true, the API response will include the server-side tool calls and responses within the `Content` message. static ToolConfig.Builderbuilder()Instantiates a builder for ToolConfig. abstract ToolConfig.BuildertoBuilder()Creates a builder with the same values as this instance. static ToolConfigfromJson(String jsonString)Deserializes a JSON string to a ToolConfig 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
-
retrievalConfig
abstract Optional<RetrievalConfig> retrievalConfig()
Optional. Retrieval config.
-
functionCallingConfig
abstract Optional<FunctionCallingConfig> functionCallingConfig()
Optional. Function calling config.
-
includeServerSideToolInvocations
abstract Optional<Boolean> includeServerSideToolInvocations()
If true, the API response will include the server-side tool calls and responses within the `Content` message. This allows clients to observe the server's tool invocations.
-
builder
static ToolConfig.Builder builder()
Instantiates a builder for ToolConfig.
-
toBuilder
abstract ToolConfig.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static ToolConfig fromJson(String jsonString)
Deserializes a JSON string to a ToolConfig object.
-
-
-
-