https://discord.gg/botpress logo
Error with execute code AI
# 🤝help
l
I was using execute code to generate code for getting the user's query and then using the knowledge base to find the answer, and store it in another variable. I used the 'ask AI' option for this and it generated some code however, it says bp. name is undefined in the line : const { answer, hits } = await bp.knowledge.query({ question: userQuestion })
n
Can you send a full screenshot of the code that you used?
p
Why do you need to "get " the user's query via an execute code card?