Double answer
# 🤝help
d
Hello! I have a wierd problem. I tried to solve it whole day, tried multiple stuff but im lost. As you can see on the diagram, i lead the user to the loop chat. However, the bot answers always twice. If i remove the @nextAssistantMessage text field, it stops, but then the bot do this: 1. You ask a question 2. Bot answers 3. You ask another question 4. Bot repeat answer no 2. 5. You ask another question 6. Bot answer to question from point 3. Hope you understand!
a
it might help of you clear your variables after each loop?
d
How exactly can i do that? im sorry im complete beginer
a
add an execute code card with something like:
workflow.YOUR_VARIABLE_NAME = ''
do it right before the transition, for both variables
d
Alright
this is much better
i got this now
I dont understand why is it type "choice" the empty message
a
what does your capture information card look like?
d
If i remove this:
I got only the empty field
without any answer
Oh thats because i cleared the var nextassistant message. I remove the cleare func for this variable, but i got the same issue as i mentioned in first message
a
Ah, that explains it. Look at what is happening to that variable,
@nextAssistantMessage
in your original, double-messaging without clearing the variable node: 1. nextAssistantMessage is sent to the user 2. The user says something 3. The AI writes a new message to nextAssistantMessage 4. nextAssistantMessage is sent to the user 5. Go back to step 1 So the way the cards are set up means that nextAssistant message is repeated twice for every loop. To break this, you can remove the text message (step 4) and put the AI task(step 3) before you ask the user a question (step 1)
d
THank you so much for great answer. I had to leave PC, i will try it tomorrow when i get to PC and let you know. Thank you for great support
Hello, so i was struggeling with it even today for few hours
I turned off the knowledge base, the second answer dissapeared
Is this a bug or?
a
I think it has more to do with how your flow was built. As long as it is working as intended, I wouldn't look too far into it
36 Views