-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d37b18e
commit 4dfb6b6
Showing
12 changed files
with
99 additions
and
18 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,37 @@ | ||
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:8080"); | ||
|
||
Gleap.initialize("ogWhNhuiZcGWrva5nlDS8l7a78OfaLlV"); | ||
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.setUrlHandler((url, newTab) => { | ||
alert("URL: " + url + " newTab: " + newTab); | ||
});*/ | ||
Gleap.on("tool-execution", (tool) => { | ||
if (tool.name === "send-money") { | ||
const amount = tool.params.amount; | ||
const contact = tool.params.contact; | ||
|
||
Gleap.setNetworkLogPropsToIgnore(["password", "token"]); | ||
|
||
Gleap.registerCustomAction((customAction) => { | ||
console.log("Custom action: ", customAction); | ||
// Initiate the transfer here. | ||
} | ||
}); | ||
|
||
Gleap.on("unread-count-changed", (unreadCount) => { | ||
console.log("Unread count changed: ", unreadCount); | ||
}); | ||
Gleap.setTicketAttribute("notes", "This is a test value."); | ||
|
||
Gleap.initialize("ixFtcUWCFjENqupXkb39Ca7uncprVfjA"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters