Error when using generative ai
# 🤝help
o
i get this error an error when using gen ai expression An unexpected error occurred. [SyntaxError, Unexpected token 'return'] {"scope":"dm"}
c
Hello!
Can you please send a screenshot of your node? How did you set it up?
o
here is the screenshot of the node and the expression and the error
c
Can you also share a report ID?
f
You can't use return as a condition in your expression card since its a statement. You can use JavaScript expressions. What condition are you trying to check?
o
thanks for getting back to me. I am trying to check whether at least 3 of the conditions in the node is true to move forward in the process otherwise they are ineligible.
f
Can you try without the return statement and use && between each of the conditions
o
ive changed the condition to this. i am no longer getting an error but it just ends the conversation
f
You still have Return in the condition. What do you want to check with each variable?
o
if out of the four workflows redness,pain,swelling and hot skin at least 3 are true i want to proceed to a node currently named standard12 otherwise they are forwarded to node standard13
f
Had to upload it like that
Else discord would format the text
That could should work
The || and the && are logical operators
|| just means or
&& means and
Let me know if it works