jjmandog commited on
Commit
24754bc
·
verified ·
1 Parent(s): 2470a41

I can’t create my own responses to customers only the ones you show ! Please fix this - Follow Up Deployment

Browse files
Files changed (2) hide show
  1. index.html +49 -0
  2. prompts.txt +2 -1
index.html CHANGED
@@ -1137,6 +1137,55 @@ d mm<!DOCTYPE html>
1137
  }
1138
  };
1139
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1140
  function testVoiceSettings() {
1141
  voiceProcessor.updateSettings();
1142
  const audio = voiceProcessor.speak("Hello, this is your AI call assistant with new voice settings.");
 
1137
  }
1138
  };
1139
 
1140
+ // Template creation functions
1141
+ function showCreateTemplateModal() {
1142
+ document.getElementById('templateModal').classList.remove('hidden');
1143
+ document.getElementById('templateName').focus();
1144
+ }
1145
+
1146
+ function hideCreateTemplateModal() {
1147
+ document.getElementById('templateModal').classList.add('hidden');
1148
+ }
1149
+
1150
+ function saveNewTemplate() {
1151
+ const name = document.getElementById('templateName').value.trim();
1152
+ const triggers = document.getElementById('templateTriggers').value.trim();
1153
+ const response = document.getElementById('templateResponse').value.trim();
1154
+
1155
+ if (!name || !response) {
1156
+ alert('Please provide both a template name and response text');
1157
+ return;
1158
+ }
1159
+
1160
+ // Add to training data
1161
+ if (!trainingData.learnedResponses.business) {
1162
+ trainingData.learnedResponses.business = [];
1163
+ }
1164
+
1165
+ trainingData.learnedResponses.business.push({
1166
+ input: name,
1167
+ response: response,
1168
+ tokens: triggers.split(',').map(t => t.trim()),
1169
+ lastUsed: new Date()
1170
+ });
1171
+
1172
+ nlp.saveToLocalStorage();
1173
+ hideCreateTemplateModal();
1174
+ showScreen('repliesScreen');
1175
+
1176
+ // Show success message
1177
+ const notification = document.createElement('div');
1178
+ notification.className = 'fixed top-16 left-1/2 transform -translate-x-1/2 bg-green-500 text-white px-4 py-2 rounded-full animate-fadeIn z-50';
1179
+ notification.textContent = 'Template created successfully!';
1180
+ document.body.appendChild(notification);
1181
+ setTimeout(() => notification.remove(), 2000);
1182
+
1183
+ // Clear form
1184
+ document.getElementById('templateName').value = '';
1185
+ document.getElementById('templateTriggers').value = '';
1186
+ document.getElementById('templateResponse').value = '';
1187
+ }
1188
+
1189
  function testVoiceSettings() {
1190
  voiceProcessor.updateSettings();
1191
  const audio = voiceProcessor.speak("Hello, this is your AI call assistant with new voice settings.");
prompts.txt CHANGED
@@ -2,4 +2,5 @@ Make voice humanistic . Add rvc technology and okada tts
2
  Please make the training work. Currently doesn’t . Add intelligence and smart learning. I want to be able to make custom text replies and also have it answer the phone and answer questions that I teach it . Have it learn diction. Make everything work and insure that this can and is used whenever someone callls my phone number 5622289429
3
  I own a car detailing business. Teach ai about it
4
  Buttons still don’t work. I still can’t train. Fix make everything functional
5
- Buttons still don’t work. I still can’t train. Fix make everything functional
 
 
2
  Please make the training work. Currently doesn’t . Add intelligence and smart learning. I want to be able to make custom text replies and also have it answer the phone and answer questions that I teach it . Have it learn diction. Make everything work and insure that this can and is used whenever someone callls my phone number 5622289429
3
  I own a car detailing business. Teach ai about it
4
  Buttons still don’t work. I still can’t train. Fix make everything functional
5
+ Buttons still don’t work. I still can’t train. Fix make everything functional
6
+ I can’t create my own responses to customers only the ones you show ! Please fix this