Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
boehlerlukas committed Aug 31, 2024
1 parent 31c1fca commit 1424119
Showing 1 changed file with 1 addition and 38 deletions.
39 changes: 1 addition & 38 deletions demo/main.js
Original file line number Diff line number Diff line change
@@ -1,44 +1,7 @@
const Gleap = window.Gleap;

Gleap.setLanguage("en");
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.setAiTools([
{
name: "send-money",
description: "Send money to a given contact.",
executionType: "button",
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) => {
console.log("Tool execution", JSON.stringify(tool, null, 2));
});

Gleap.setTicketAttribute("notes", "This is a test value.");

Gleap.identify("user1234", {
email: "[email protected]",
name: "Lukas",
sla: 30,
});

Gleap.initialize("ogWhNhuiZcGWrva5nlDS8l7a78OfaLlV");
Gleap.initialize("EylYN1UChqJkT5wJHu3bA8hswd9xOWJ6");

0 comments on commit 1424119

Please sign in to comment.