Starting April 29, 2025, Gemini 1.5 Pro and Gemini 1.5 Flash models are not available in projects that have no prior usage of these models, including new projects. For details, see Model versions and lifecycle.
Adds a callable function to the AutomaticFunctionCallingResponder.
Note:: If you don't want to manually provide parameter names, you can ignore
orderedParameterNames and compile your code with the "-parameters" flag. In this case, the
parameter names can be auto retrieved from reflection.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-16 UTC."],[],[],null,["# Class AutomaticFunctionCallingResponder (1.32.0)\n\n public final class AutomaticFunctionCallingResponder\n\n**Deprecated.** *This class and its package are deprecated. See the [migration guide](https://cloud.google.com/vertex-ai/generative-ai/docs/deprecations/genai-vertexai-sdk#java) for more details.*\n\nA responder that automatically calls functions when requested by the GenAI model. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e AutomaticFunctionCallingResponder \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nConstructors\n------------\n\n### AutomaticFunctionCallingResponder() (deprecated)\n\n public AutomaticFunctionCallingResponder()\n\nConstructs an AutomaticFunctionCallingResponder instance.\n\n### AutomaticFunctionCallingResponder(int maxFunctionCalls) (deprecated)\n\n public AutomaticFunctionCallingResponder(int maxFunctionCalls)\n\nConstructs an AutomaticFunctionCallingResponder instance.\n\nMethods\n-------\n\n### addCallableFunction(String functionName, Method callableFunction, String\\[\\] orderedParameterNames) (deprecated)\n\n public void addCallableFunction(String functionName, Method callableFunction, String[] orderedParameterNames)\n\nAdds a callable function to the AutomaticFunctionCallingResponder.\n\n**Note:** : If you don't want to manually provide parameter names, you can ignore\n`orderedParameterNames` and compile your code with the \"-parameters\" flag. In this case, the\nparameter names can be auto retrieved from reflection.\n\n### getMaxFunctionCalls() (deprecated)\n\n public int getMaxFunctionCalls()\n\nGets the maximum number of function calls to make in a row.\n\n### setMaxFunctionCalls(int maxFunctionCalls) (deprecated)\n\n public void setMaxFunctionCalls(int maxFunctionCalls)\n\nSets the maximum number of function calls to make in a row."]]