trustpilot logic chatbot+
Showing
1 changed file
with
6 additions
and
0 deletions
| ... | @@ -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); | ... | ... |
-
Please register or sign in to post a comment