Class FunctionCallingUtils
java.lang.Object
com.google.adk.tools.FunctionCallingUtils
Utility class for function calling.
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.genai.types.FunctionDeclarationbuildFunctionDeclaration(Method func, List<String> ignoreParams) Builds a FunctionDeclaration from a Java Method, ignoring parameters with the given names.static com.google.genai.types.SchemabuildSchemaFromType(Type type) Builds a Schema from a Java Type, creating a new context for the generation process.
-
Method Details
-
buildFunctionDeclaration
public static com.google.genai.types.FunctionDeclaration buildFunctionDeclaration(Method func, List<String> ignoreParams) Builds a FunctionDeclaration from a Java Method, ignoring parameters with the given names.- Parameters:
func- The JavaMethodto convert into a FunctionDeclaration.ignoreParams- The names of parameters to ignore.- Returns:
- The generated
FunctionDeclaration. - Throws:
IllegalArgumentException- if a type is encountered that cannot be serialized by Jackson.
-
buildSchemaFromType
Builds a Schema from a Java Type, creating a new context for the generation process.- Parameters:
type- The JavaTypeto convert into a Schema.- Returns:
- The generated
Schema. - Throws:
IllegalArgumentException- if a type is encountered that cannot be serialized by Jackson.
-