Cleanup from knowledge bot source - bug in the cod...
# 🤝help
a
Hi guys. I have a question about scrubbing a knowledge bot response from the source. I read a thread how to do it using code and text output (https://discord.com/channels/1108396290624213082/1202592003989184542). But I have a small problem. I am using understanding the context of the user's message with AI Transition. If the user says he understood everything - he goes to the beginning to the fork, and if there is still a question - to the same block to ask again. And when I added code execution with text output I have a broken bot, gives an error on the moment if I test with messages that I understand everything (should transfer to the beginning block). Help please
f
Hey Could you send me your bot so I can try and reproduce this error. Remember to delete all sensitive information
a
I rearranged the code execution after checking for a value and it started working. But it still crashes if there is no such question in the database, it generates an error
And when you send a message like, "I found out everything, thank you" - it gives an error. (in AI Transition there is a choice: one more question is asked - and sends to the beginning of this block; I found out everything - sends to the initial fork). In the second case it breaks
f
Ah yes okay. That is because its running your code even though it didn't find an answer to the question
Instead of this !turn.KnowledgeAgent.answer === 0 in your expression card just use !turn.KnowledgeAgent.answer
You might want to have the AI Transition on the node Standard26
a
Oh, thank you so much. It's starting to work. Kudos to you.
I just didn't get the idea about AI Transition on the node standard26. It just serves to communicate that he doesn't know the question. Is there any way to optimize this with AI Transition?
2 Views