File tree Expand file tree Collapse file tree 1 file changed +1
-38
lines changed Expand file tree Collapse file tree 1 file changed +1
-38
lines changed Original file line number Diff line number Diff line change 1
1
const Gleap = window . Gleap ;
2
2
3
- Gleap . setLanguage ( "en" ) ;
4
3
Gleap . setFrameUrl ( "http://0.0.0.0:3001" ) ;
5
4
Gleap . setApiUrl ( "http://0.0.0.0:9000" ) ;
6
5
Gleap . setWSApiUrl ( "ws://0.0.0.0:9000" ) ;
7
6
8
- Gleap . setAiTools ( [
9
- {
10
- name : "send-money" ,
11
- description : "Send money to a given contact." ,
12
- executionType : "button" ,
13
- parameters : [
14
- {
15
- name : "amount" ,
16
- description :
17
- "The amount of money to send. Must be positive and provided by the user." ,
18
- type : "number" ,
19
- required : true ,
20
- } ,
21
- {
22
- name : "contact" ,
23
- description : "The contact to send money to." ,
24
- type : "string" ,
25
- enum : [ "Alice" , "Bob" ] ,
26
- required : true ,
27
- } ,
28
- ] ,
29
- } ,
30
- ] ) ;
31
-
32
- Gleap . on ( "tool-execution" , ( tool ) => {
33
- console . log ( "Tool execution" , JSON . stringify ( tool , null , 2 ) ) ;
34
- } ) ;
35
-
36
- Gleap . setTicketAttribute ( "notes" , "This is a test value." ) ;
37
-
38
- Gleap . identify ( "user1234" , {
39
- email : "lukas@test.com" ,
40
- name : "Lukas" ,
41
- sla : 30 ,
42
- } ) ;
43
-
44
- Gleap . initialize ( "ogWhNhuiZcGWrva5nlDS8l7a78OfaLlV" ) ;
7
+ Gleap . initialize ( "EylYN1UChqJkT5wJHu3bA8hswd9xOWJ6" ) ;
You can’t perform that action at this time.
0 commit comments