public final class AutomaticFunctionCallingResponderDeprecated. This class and its package are deprecated. See the migration guide for more details.
A responder that automatically calls functions when requested by the GenAI model.
Constructors
AutomaticFunctionCallingResponder() (deprecated)
public AutomaticFunctionCallingResponder()Constructs an AutomaticFunctionCallingResponder instance.
AutomaticFunctionCallingResponder(int maxFunctionCalls) (deprecated)
public AutomaticFunctionCallingResponder(int maxFunctionCalls)Constructs an AutomaticFunctionCallingResponder instance.
| Parameter | |
|---|---|
| Name | Description |
maxFunctionCalls |
intthe maximum number of function calls to make in a row |
Methods
addCallableFunction(String functionName, Method callableFunction, String[] orderedParameterNames) (deprecated)
public void addCallableFunction(String functionName, Method callableFunction, String[] orderedParameterNames)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.
| Parameters | |
|---|---|
| Name | Description |
functionName |
Stringthe name of the function |
callableFunction |
Methodthe method to call when the functionName is requested |
orderedParameterNames |
String[]the names of the parameters in the order they are passed to the function |
getMaxFunctionCalls() (deprecated)
public int getMaxFunctionCalls()Gets the maximum number of function calls to make in a row.
| Returns | |
|---|---|
| Type | Description |
int |
|
setMaxFunctionCalls(int maxFunctionCalls) (deprecated)
public void setMaxFunctionCalls(int maxFunctionCalls)Sets the maximum number of function calls to make in a row.
| Parameter | |
|---|---|
| Name | Description |
maxFunctionCalls |
int |