let aiTool = GleapAiTool(
name: "send-money",
// Describe the tool. This can also contain further instructions for the LLM.
toolDescription: "Send money to a given contact.",
// Let the LLM know what the tool is doing. This will allow Kai to update the customer accordingly.
response: "The transfer got initiated but not completed yet. The user must confirm the transfer in the banking app.",
// Set the execution type to auto or button.
executionType: 'button',
// Specify the parameters (it's also possible to pass an empty array)
parameters: [
GleapAiToolParameter(
name: "amount",
parameterDescription: "The amount of money to send. Must be positive and provided by the user.",
type: "string",
required: true
),
GleapAiToolParameter(
name: "contact",
parameterDescription: "The contact to send money to.",
type: "string",
required: true,
enums: ["Alice", "Bob"]
)
]
)
// Set the available tools as array of tools
Gleap.setAiTools([aiTool])