5cc84c8d by Jerald Lim

trustpilot logic chatbot+

1 parent 360b56bc
......@@ -62,6 +62,12 @@ function App() {
}
async function submitPrompt() {
const TPLogicRun = window.TPLogicRun;
if (typeof TPLogicRun === 'function') {
TPLogicRun();
}
const userInput = ['what', 'why', 'when', 'where' , 'which', 'did', 'do', 'how', 'can', 'are', 'who'];
const userInputRegex = new RegExp(`\\b(${userInput.join('|')})\\b`, 'gi');
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!