@@ -60,6 +60,59 @@ const assistant = {
60
60
};
61
61
```
62
62
63
+ You can also create squad using the assistant to handle complex workflows and tasks. For example.
64
+
65
+ ``` js
66
+
67
+ const squad = {
68
+ " squad" : {
69
+ " members" : [
70
+ {
71
+ " assistantId" : " information-gathering-assistant-id" ,
72
+ " assistantDestinations" : [{
73
+ " type" : " assistant" ,
74
+ " assistantName" : " Appointment Booking" ,
75
+ " message" : " Please hold on while I transfer you to our appointment booking assistant." ,
76
+ " description" : " Transfer the user to the appointment booking assistant after they say their name."
77
+ }],
78
+ },
79
+ {
80
+ " assistant" : {
81
+ " name" : " Appointment Booking" ,
82
+ },
83
+ }
84
+ ]
85
+ }
86
+ }
87
+
88
+ (function (d , t ) {
89
+ var g = document .createElement (t),
90
+ s = d .getElementsByTagName (t)[0 ];
91
+ g .src =
92
+ " https://cdn.jsdelivr.net/gh/VapiAI/html-script-tag@latest/dist/assets/index.js" ;
93
+ g .defer = true ;
94
+ g .async = true ;
95
+ s .parentNode .insertBefore (g, s);
96
+
97
+ g .onload = function () {
98
+ const vapi = window .vapiSDK .run ({
99
+ apiKey: " " , // required Use your Public Key
100
+ squad: squad, // You can pass in squad as an option to create squad.
101
+ config: buttonConfig // optional
102
+ });
103
+
104
+ if (vapi) {
105
+ // Extend more using vapi
106
+
107
+ }
108
+ };
109
+ })(document , " script" );
110
+
111
+
112
+
113
+ ```
114
+
115
+
63
116
You can also customise the look and feel of your Vapi Support Button using the following configurations.
64
117
The button will have 3 states, ` idle ` , ` loading ` and ` active ` .
65
118
0 commit comments