Skip to content

Commit

Permalink
v14.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
boehlerlukas committed Sep 14, 2024
1 parent 8bf001d commit 10193fe
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 50 deletions.
2 changes: 1 addition & 1 deletion build/cjs/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/esm/index.mjs

Large diffs are not rendered by default.

46 changes: 1 addition & 45 deletions demo/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,4 @@ Gleap.setFrameUrl("http://0.0.0.0:3001");
Gleap.setApiUrl("http://0.0.0.0:9000");
Gleap.setWSApiUrl("ws://0.0.0.0:9000");

Gleap.initialize("ogWhNhuiZcGWrva5nlDS8l7a78OfaLlV");

const transactionTool = {
// Name the tool. Only lowecase letters and - as well as _ are allowed.
name: "send-money",
// Describe the tool. This can also contain further instructions for the LLM.
description: "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: "auto",
// Specify the parameters (it's also possible to pass an empty array)
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"], // Optional
required: true,
},
],
};

Gleap.on("tool-execution", (tool) => {
console.log(tool);
});

// Add all available tools to the array.
const tools = [transactionTool];

// Set the AI tools.
Gleap.setAiTools(tools);

Gleap.on("outbound-sent", (data) => {
const { outboundId, outbound, formData } = data;
console.log(data);
});
Gleap.initialize("44iWQrD3YuDxqj6aw5HqsKyuaas28ZKu");
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gleap",
"version": "14.0.0",
"version": "14.0.1",
"main": "build/cjs/index.js",
"module": "build/esm/index.mjs",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion published/14.0.0/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion published/latest/index.js

Large diffs are not rendered by default.

0 comments on commit 10193fe

Please sign in to comment.