Skip to content

Commit bfce69f

Browse files
committed
v15.0.5
1 parent 9d49e46 commit bfce69f

File tree

13 files changed

+51
-10
lines changed

13 files changed

+51
-10
lines changed

build/browser/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/browser/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/cjs/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/cjs/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/esm/index.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

build/esm/index.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/main.js

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,38 @@ Gleap.setFrameUrl("http://0.0.0.0:3001");
44
Gleap.setApiUrl("http://0.0.0.0:9000");
55
Gleap.setWSApiUrl("ws://0.0.0.0:9000");
66

7-
Gleap.initialize("GnhEkS8fdwxNVjyn3BnYwKzpCkiHgKWL");
7+
const transactionTool = {
8+
// Name the tool. Only lowecase letters and - as well as _ are allowed.
9+
name: 'send-money',
10+
// Describe the tool. This can also contain further instructions for the LLM.
11+
description: 'Send money to a given contact.',
12+
// Let the LLM know what the tool is doing. This will allow Kai to update the customer accordingly.
13+
response: 'The transfer got initiated but not completed yet. The user must confirm the transfer in the banking app.',
14+
// Set the execution type to auto or button.
15+
executionType: 'button',
16+
// Specify the parameters (it's also possible to pass an empty array)
17+
parameters: [{
18+
name: 'amount',
19+
description: 'The amount of money to send. Must be positive and provided by the user.',
20+
type: 'number',
21+
required: true
22+
}, {
23+
name: 'contact',
24+
description: 'The contact to send money to.',
25+
type: 'string',
26+
enum: ["Alice", "Bob"], // Optional
27+
required: true
28+
}]
29+
};
30+
31+
// Add all available tools to the array.
32+
const tools = [transactionTool];
33+
34+
// Set the AI tools.
35+
Gleap.setAiTools(tools);
36+
37+
Gleap.initialize("ogWhNhuiZcGWrva5nlDS8l7a78OfaLlV");
38+
39+
Gleap.on("tool-execution", (tool) => {
40+
console.log(tool);
41+
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gleap",
3-
"version": "15.0.4",
3+
"version": "15.0.5",
44
"main": "build/cjs/index.js",
55
"module": "build/esm/index.mjs",
66
"exports": {

published/15.0.5/index.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

published/15.0.5/index.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)