Need help with routing if it has no answers in the...
# 🤝help
c
Right now, If we ask a question and the answer is inside the knowledgebase it gives the correct answer and goes to the next node which asks "Have more question - Yes / No". This part is working fine. What's not working: If suppose the answer is not available within the knowledgebase, I want to execute "I don't have answer" node and display "Sorry I don't have answer for it" but this part is not working, it just goes to the "Have more questions" node which I mentioned above. How to make it work the right way, Any solutions? Also, test your chatbot option always shows as Training and cannot use it. Thanks.
b
In the no answer transition put this instead:
Copy code
event.state.agentVariables.KnowledgeAgent.turn.responded === false
It should do the trick
c
Hi, Thanks for the answer, I pasted the code in the transition, it still didn't worked.
b
Weird, I got the same case in my bot and this code works. Maybe try to refresh the page, I feel like sometimes Botpress takes some time to update. Also make sure the KB is not triggering, maybe it triggers but don't actually return an answer but just an empty string
c
Okay, I will wait for sometime. Can you also please explain how to trigger KB to just return a empty string
Update: @bulky-dusk-45106 I tried now and it's working now. Thanks brother.
28 Views