// Export all configuration and learning data // Business settings data let businessSettings = { maxRingTime: 30, smsResponseTime: 15, businessHours: { open: "08:00", close: "18:00" }, responses: { missedCall: "Hello, this is Jay's Mobile Wash. We missed your call. Please leave a message and we'll return your call as soon as possible.", afterHours: "Thank you for contacting Jay's Mobile Wash. Our business hours are [hours]. We will respond when we reopen." } }; function loadSettings() { const saved = localStorage.getItem('JMW_Settings'); if (saved) { businessSettings = JSON.parse(saved); document.getElementById('maxRingTime').value = businessSettings.maxRingTime; document.getElementById('smsResponseTime').value = businessSettings.smsResponseTime; document.getElementById('openTime').value = businessSettings.businessHours.open; document.getElementById('closeTime').value = businessSettings.businessHours.close; document.getElementById('missedCallResponse').value = businessSettings.responses.missedCall; document.getElementById('afterHoursResponse').value = businessSettings.responses.afterHours; } } function saveSettings() { businessSettings = { maxRingTime: parseInt(document.getElementById('maxRingTime').value), smsResponseTime: parseInt(document.getElementById('smsResponseTime').value), businessHours: { open: document.getElementById('openTime').value, close: document.getElementById('closeTime').value }, responses: { missedCall: document.getElementById('missedCallResponse').value, afterHours: document.getElementById('afterHoursResponse').value } }; localStorage.setItem('JMW_Settings', JSON.stringify(businessSettings)); // Show success message const notification = document.createElement('div'); notification.className = 'fixed top-40 left-1/2 transform -translate-x-1/2 bg-green-500 text-white px-6 py-3 rounded-xl animate-fadeIn z-50 shadow-lg'; notification.innerHTML = 'Settings saved successfully!'; document.body.appendChild(notification); setTimeout(() => notification.remove(), 3000); } // Enhanced answerCall with live training and call response function answerCall(isTestCall = false) { const currentTime = new Date(); const openTime = new Date(); const closeTime = new Date(); const [openHours, openMins] = businessSettings.businessHours.open.split(':'); const [closeHours, closeMins] = businessSettings.businessHours.close.split(':'); openTime.setHours(openHours, openMins); closeTime.setHours(closeHours, closeMins); const fab = document.querySelector('.fab'); const icon = fab.querySelector('i'); if (currentTime < openTime || currentTime > closeTime) { icon.classList.remove('fa-phone'); icon.classList.add('fa-clock'); showResponseMessage(businessSettings.responses.afterHours.replace('[hours]', `${businessSettings.businessHours.open} - ${businessSettings.businessHours.close}`)); setTimeout(() => { icon.classList.remove('fa-clock'); icon.classList.add('fa-phone'); }, 1000); return; } // Start call processing icon.classList.remove('fa-phone'); icon.classList.add('fa-headset'); // Create call interface const homeScreen = document.getElementById('homeScreen'); const callWindow = document.createElement('div'); callWindow.className = 'fixed inset-0 bg-black bg-opacity-70 z-50 flex flex-col items-center justify-center'; callWindow.innerHTML = `

Incoming Call

(562) 228-9429

Train › Teach AI during call

`; document.body.appendChild(callWindow); // Auto-answer if in test call mode if (isTestCall) { setTimeout(() => handleCallAction('train'), 1500); } } // Handle different call actions function handleCallAction(action) { const callWindow = document.querySelector('.fixed.inset-0'); const icon = document.querySelector('.fab i'); switch(action) { case 'decline': callWindow.remove(); icon.classList.remove('fa-headset'); icon.classList.add('fa-phone'); showResponseMessage("Call declined"); break; case 'answer': callWindow.innerHTML = `

Live Call in Progress

`; // Simulate AI answering call setTimeout(() => { addToCallTranscript("AI Assistant: Hello, thank you for calling Jay's Mobile Wash. How can I help you today?"); }, 1000); break; case 'train': callWindow.innerHTML = `

Training Mode Active

AI will ask you questions during this call

`; // Start training questions startTrainingQuestions(); break; case 'end': callWindow.remove(); icon.classList.remove('fa-headset'); icon.classList.add('fa-phone'); showResponseMessage("Call ended"); break; } } // Helper function for call transcript function addToCallTranscript(message) { const transcript = document.getElementById('callTranscript'); if (transcript) { const p = document.createElement('p'); p.textContent = message; transcript.appendChild(p); transcript.scrollTop = transcript.scrollHeight; } } // Training sequence for live calls function startTrainingQuestions() { setTimeout(() => { addToCallTranscript("AI: I'm learning how to handle calls. Could you give me an example response when someone asks about pricing?"); }, 1500); setTimeout(() => { addToCallTranscript("AI: How should I respond when a customer wants to book an appointment?"); }, 5000); } function submitLiveTraining() { const input = document.getElementById('liveTrainingInput'); if (input.value.trim()) { addToCallTranscript(`You: ${input.value}`); storeTrainingPattern("live call training", input.value); input.value = ''; // Ask next question setTimeout(() => { const questions = [ "AI: What should I say when a customer is unhappy with service?", "AI: How do I respond to inquiries about same-day service?", "AI: Can you give me an example of how to confirm an appointment?" ]; const randomQuestion = questions[Math.floor(Math.random() * questions.length)]; addToCallTranscript(randomQuestion); }, 2000); } } function showResponseMessage(message) { const responseContainer = document.querySelector('#callResponseContainer'); if (!responseContainer) { const container = document.createElement('div'); container.id = 'callResponseContainer'; container.className = 'fixed top-16 left-1/2 transform -translate-x-1/2 bg-black bg-opacity-80 text-white px-4 py-2 rounded-lg z-50'; container.textContent = message; document.body.appendChild(container); setTimeout(() => container.remove(), 3000); } } function exportConfiguration() { const data = { trainingData: trainingData, timestamp: new Date().toISOString(), version: "1.0", aiProfile: "Grok-Style Learning Assistant" }; const blob = new Blob([JSON.stringify(data, null, 2)], {type: 'application/json'}); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = `AI-Call-Assistant-${new Date().toISOString().split('T')[0]}.json`; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); alert("Configuration exported successfully!"); } window.huggingface={variables:{"SPACE_CREATOR_USER_ID":"650cd8187eea23e8cb386237"}};d> AI Phone Assistant
9:41
100%

Call Assistant

AI that answers your calls and learns over time

Current Status

Assistant is active

Connected Number

(562) 228-9429

Today's Stats

Answered 5 calls, 12 min talk time

Smart Replies

Customize call responses

Train AI

Improve AI responses

Call Log

Incoming Call

(562) 228-9429

2:15 PM

Missed Call

Unknown

Today

AI Answered

Jay's Mobile Wash

Yesterday

Smart Replies

Customize how AI answers calls

AI Learning Mode

Improves responses over time

Learning from interactions

Custom Response Templates

Set predefined responses

Business Calls

"Hello, this is [Your Name]'s assistant..."

Personal Calls

"Hi, this is [Name]'s phone..."

Spam Protection

"Sorry, this number is not accepting calls..."

Response Style

Formal Tone

Professional business language

Friendly Tone

Casual conversation style

Use My Name

"This is [Your Name]'s phone"

Train AI

Linked to (562) 228-9429

How would you like me to respond to calls from your family?

Always transfer calls from Mom and Dad to me

Noted! I'll transfer calls from Mom and Dad immediately.

For other family members, how should I respond?

Ask them for the reason of calling and text me if it's important

Got it. Here's the response I created based on your feedback:

"Hello, this is Alex's assistant. Could you let me know what you're calling about? I'll make sure they get your message."

Does this work?

The AI learns from every interaction

AI Chat Test

Test and train the AI assistant

Hi! I'm your AI assistant for Jay's Mobile Wash. I can answer questions about our detailing services and learn from our conversations.

Would you like to test my knowledge or teach me something new?

I'll learn from every interaction

Jay's Mobile Wash Settings

Configure AI response behavior

Call Response Timing

Max Ring Time (seconds)

If you don't answer by this time, AI will answer

No-Response Text After (minutes)

If you don't reply to SMS by this time

Business Hours

Call Handling Configuration

Answer Incoming Calls

Enable AI to answer phone calls

Live Call Training Mode

Ask me questions during calls to learn

Response Messages

Made with DeepSite LogoDeepSite - 🧬 Remix