// Creating parameters
GleapAiToolParameter amountParameter = new GleapAiToolParameter(
"amount",
"The amount of money to send. Must be positive and provided by the user.",
"string",
true
);
String[] possibleEnumValues = {"Alice", "Bob"};
GleapAiToolParameter contactParameter = new GleapAiToolParameter(
"contact",
"The contact to send money to.",
"string",
true,
possibleEnumValues
);
GleapAiToolParameter[] params = {amountParameter, contactParameter};
// Creating the AI tool with the parameters
GleapAiTool transactionTool = new GleapAiTool(
"send-money",
"Send money to a given contact.",
"The transfer got initiated but not completed yet. The user must confirm the transfer in the banking app.",
"button",
params
);
GleapAiTool[] tools = {transactionTool};
// Set the available tools using the static method
Gleap.getInstance().setAiTools(tools);