5cc84c8d by Jerald Lim

trustpilot logic chatbot+

1 parent 360b56bc
...@@ -62,6 +62,12 @@ function App() { ...@@ -62,6 +62,12 @@ function App() {
62 } 62 }
63 63
64 async function submitPrompt() { 64 async function submitPrompt() {
65
66 const TPLogicRun = window.TPLogicRun;
67 if (typeof TPLogicRun === 'function') {
68 TPLogicRun();
69 }
70
65 const userInput = ['what', 'why', 'when', 'where' , 'which', 'did', 'do', 'how', 'can', 'are', 'who']; 71 const userInput = ['what', 'why', 'when', 'where' , 'which', 'did', 'do', 'how', 'can', 'are', 'who'];
66 const userInputRegex = new RegExp(`\\b(${userInput.join('|')})\\b`, 'gi'); 72 const userInputRegex = new RegExp(`\\b(${userInput.join('|')})\\b`, 'gi');
67 const inputMatches = chatInput.match(userInputRegex); 73 const inputMatches = chatInput.match(userInputRegex);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!