Skip to content

Commit 9d85446

Browse files
update config
1 parent b0e1eda commit 9d85446

File tree

2 files changed

+29
-31
lines changed

2 files changed

+29
-31
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
apiKey: "",
3838
assistant: assistant,
3939
position: "bottom",
40-
color: `rgb(93, 254, 202)`,
40+
// color: `rgb(93, 254, 202)`,
4141
});
4242
};
4343
})(document, "script");

src/index.js

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,43 @@ import defaultAssistant from "./assistant";
33
import { createButtonElement } from "./button";
44
import { defaultListeners } from "./listeners";
55

6-
const defaultButtonConfig = {
7-
position: "bottom",
8-
offset: "40px",
9-
width: "50px",
10-
height: "50px",
11-
idle: {
12-
color: `rgb(93, 254, 202)`,
13-
type: "pill",
14-
title: "Have a quick question?",
15-
subtitle: "Click here to talk with our AI assistant",
16-
icon: ``,
17-
},
18-
loading: {
19-
color: `rgb(255, 255, 255)`,
20-
type: "pill",
21-
title: "Connecting...",
22-
subtitle: "Please wait",
23-
icon: ``,
24-
},
25-
active: {
26-
color: `rgb(255, 255, 255)`,
27-
type: "pill",
28-
title: "Call is in progress...",
29-
subtitle: "Click again to end the call.",
30-
icon: ``,
31-
},
32-
};
33-
346
const runSDK = ({
357
apiKey = "",
368
assistant = defaultAssistant(),
379

38-
button: defaultButtonConfig,
10+
buttonConfig = {
11+
position: "bottom",
12+
offset: "40px",
13+
width: "50px",
14+
height: "50px",
15+
idle: {
16+
color: `rgb(93, 254, 202)`,
17+
type: "pill",
18+
title: "Have a quick question?",
19+
subtitle: "Click here to talk with our AI assistant",
20+
icon: ``,
21+
},
22+
loading: {
23+
color: `rgb(255, 255, 255)`,
24+
type: "pill",
25+
title: "Connecting...",
26+
subtitle: "Please wait",
27+
icon: ``,
28+
},
29+
active: {
30+
color: `rgb(255, 255, 255)`,
31+
type: "pill",
32+
title: "Call is in progress...",
33+
subtitle: "Click again to end the call.",
34+
icon: ``,
35+
},
36+
},
3937
// position = "bottom",
4038
// color = `rgb(93, 254, 202)`,
4139
// offset = "40px",
4240
}) => {
4341
const vapi = new Vapi(apiKey);
44-
const button = createButtonElement(defaultButtonConfig);
42+
const button = createButtonElement(buttonConfig);
4543

4644
defaultListeners(vapi, button, color, assistant);
4745

0 commit comments

Comments
 (0)