I am trying to create a bot to help novice programmers to, amongst other things, decode compiler error messages. The idea is that they could copy and paste the error message and be offered help on what it really means and how to fix it. I’d like to extract some information from the message and use in in the response.
Chatbot: Paste your error here User: ERROR on line 17: Variable counter has not been assigned a value. Chatbot: This error means that somewhere on line 17 you are trying to use a variable called "counter", but the computer has not seen this variable before and so doesn't know about it. Chatbot: Possible Solution: If you think you have created this variable and put a value in it, then check your spelling of the variable name. Example of this error number = 4 number = Number + 1 In this case the computer sees Number as a different variable to number Chatbot: Possible Solution: Make sure that the variable has a value before you use it. This might be as simple as setting a score to 0 before a game starts Example of this error score = score + 1 In this case, the variable score has not been set a value. The computer tries to evaluate score + 1, but gets stuck because it doesn't know what score is
Most chatbots, including botpress, seem to work well with training and NL data, but this seems more like a job for regular expressions or similar. I have looked at the patterns in the NLU unit, but they seem to match the whole pattern rather than being able to extract part of it.
Any ideas about how to approach a project like this? Code it in a custom action?
I have a lot of development experience, but this would be my first botpress bot.