Skip to content

Commit 0b4ab9a

Browse files
Add AssistantOverrides for the assistant start
1 parent fbe41c5 commit 0b4ab9a

File tree

8 files changed

+882
-784
lines changed

8 files changed

+882
-784
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ To add Vapi to your website, include the following javascript snippet in your HT
2929
const vapi = window.vapiSDK.run({
3030
apiKey: "", // required Use your Public Key
3131
assistant: assistant, // required
32+
assistantOverrides: {}, // optional (This lets you override the assistant configuration and can be used alongside assistantId.)
3233
config: buttonConfig // optional
3334
});
3435

dist/assets/index.es.js

Lines changed: 524 additions & 434 deletions
Large diffs are not rendered by default.

dist/assets/index.js

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,15 @@
1919
<button id="log-action" onClick="logUserAction()">Log Action</button>
2020

2121
<script>
22-
const assistant = "61250299-108c-490f-984c-c7c0ebdfd5ee"; // Replace with your assistant ID
22+
const assistant = "6e5de015-6983-4bf5-ac44-d18c19076ae2"; // Replace with your assistant ID
2323
const apiKey = "%VITE_APP_VAPI_API_TOKEN%"; // Replace with your API key
2424

2525
var vapiInstance = null;
2626

27+
const assistantOverrides = {
28+
"firstMessage": "How may I assist you?"
29+
} // Assistant Overrides Let u override some of the assistant Configurations. This can be used alongside assistantId
30+
2731
const buttonConfig = {
2832
position: "bottom-right", // "bottom" | "top" | "left" | "right" | "top-right" | "top-left" | "bottom-left" | "bottom-right"
2933
offset: "10px", // decide how far the button should be from the edge
@@ -69,6 +73,7 @@
6973
const vapi = window.vapiSDK.run({
7074
apiKey: apiKey, // required
7175
assistant: assistant, // required
76+
assistantOverrides: assistantOverrides, // optional
7277
config: buttonConfig, // optional
7378
});
7479

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
"vite": "^5.0.8"
1414
},
1515
"dependencies": {
16-
"@vapi-ai/web": "^1.1.3"
16+
"@vapi-ai/web": "1.1.7"
1717
}
1818
}

0 commit comments

Comments
 (0)