Releases: GleapSDK/JavaScript-SDK
Releases · GleapSDK/JavaScript-SDK
v13.7.4
Update main.js
v13.6.7
Added option for our AI tools.
executionType: 'button' | 'auto',
button: Kai shows a button to the user, to execute the tool. The tool will not be executed automatically
auto: The tool will be executed automatically.
v13.6.6
v13.6.6
v13.6.5
- Improved tooltip position calculation.
v13.6.4
- Fixed issue with tooltips.
v13.6.2
- Fixed tooltip positioning.
v13.6.1
- Added smart links.
v13.6.0
- Added tooltips for JavaScript.
v13.5.3
- RTL layout fixes.
v13.5.0
Added AI tools to register local AI functions, allowing you to create deep integrations between Kai and your app.
Gleap.setAiTools([{
name: 'send-money',
description: 'Send money to a given contact.',
response: 'The transfer got initiated but not completed yet. The user must confirm the transfer in the banking app.',
parameters: [{
name: 'amount',
description: 'The amount of money to send. Must be positive and provided by the user.',
type: 'number',
required: true
}, {
name: 'contact',
description: 'The contact to send money to.',
type: 'string',
enum: ["Alice", "Bob"],
required: true
}]
}]);
Gleap.on("tool-execution", (tool) => {
if (tool.name === "send-money") {
const amount = tool.params.amount;
const contact = tool.params.contact;
// Initiate the transfer here.
}
});