<!-- Floating Web-RTC Calling Widget -->
<script src="https://unpkg.com/@vapi-ai/web"></script>
<script>
const vapi = new Vapi("rachel");
const callBtn = document.createElement("button");
callBtn.style = "position:fixed;bottom:25px;right:25px;background:#10b981;color:white;border:none;border-radius:50px;width:60px;height:60px;font-size:24px;box-shadow:0 4px 10px rgba(0,0,0,0.25);cursor:pointer;z-index:99999;";
callBtn.innerHTML = "đ";
document.body.appendChild(callBtn);
let activeCall = false;
callBtn.onclick = () => {
if (!activeCall) {
vapi.start({
model: "meta-llama/llama-3-8b-instruct:free",
systemPrompt: `You are a supportive customer service assistant speaking for our WooCommerce web store. Keep speech friendly, brief, and clear. Help buyers lookup shipping tracks.`
});
callBtn.style.background = "#ef4444";
callBtn.innerHTML = "âšī¸";
activeCall = true;
} else {
vapi.stop();
callBtn.style.background = "#10b981";
callBtn.innerHTML = "đ";
activeCall = false;
}
};
</script>