https://discord.gg/botpress logo
Error when a product isn't in the knowledge bases
# 🤝help
b
(I'm spanish if something is wrong) I have an error when I call a product and it isn't in the knowledge bases. How can I change this error message into a fall back?
p
How are you querying the knowledge base?
b
I have a raw input, then a query knowledge bases agent, after of that AI generate text and then I send the message.
p
Then you would have to specify in your generate text card that if the knowledge base answer is empty to write x message.
Hope this helps!
b
It doesnt work, the message of the agent is something like "Im sorry, but I cant acced to links or external information...", thats because when i call the item, the link of the product has to be in the message.. In conclusion specifying in the generate txt crd doesnt works. If you have another solution tell me please!!
p
Then validate if the link is there before reaching the Generate text card and if it isn't send out a message which could be manually chosen or written by ai.
b
Okey that it finally worked, thank you!!!!
p
Of course, happy to help!