I am trying to build a BMI calculator inside Watson but it seems like Watson is not supporting number comparison when you use the "Multiple conditioned responses".
<? ($weight / ($height * $height) ) < 18.5 ?>
This code will throw an error:
SpelParseException when evaluating dialog node ID [response_8_1624288200413]. Condition [<? ($weight / ($height * $height) ) < 18.5 ?>] could not be parsed. Check the syntax of the expression. SpEL syntax error: Expression [<? ($weight / ($height * $height) ) < 18.5 ?>] converted to [<? (context['weight'] / (context['height'] * context['height']) ) < 18.5 ?>] at position 0: EL1070E: Problem parsing left operand
Edit: Solved it. It was my own fault. If you are setting up conditions in "Multiple conditioned responses", do not include .
In this case, you just put ($weight / ($height * $height) ) < 18.5
in the "If assistant recognizes" section
------------------------------
Anwar Jutt
------------------------------
#GlobalAIandDataScience#GlobalDataScience