27441a3a by Janis

Merge branch '28320_trustpilot_logic_chatbot_plus' into 'master'

trustpilot logic chatbot+

See merge request !68
2 parents 360b56bc 5cc84c8d
......@@ -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!