https://discord.gg/botpress logo
How to access an LLM from an "after incoming messa...
# 🤝help
b
Hello guys. Anyone knows how can I call an LLM inside this type of hooks? I basically want the bot to always be ready, if at any node in the workflow, the user mentions the desire to buy a specific type of product. I can't simply use JS code because I want to use the LLM as fallback in "difficult to interpret cases". Like if the user says "I can never not wear rings". In this case I need an LLM because if I simply implement code rules the bot wont be able to interpret what type of product the user truly wants. I tried calling the LLM using: const answer = await bp.llm.run({ prompt, model: MODEL, temperature: 0 }); But the hook can't recognize/access "bp". Is there any way to call the LLM inside the hook? Thank you very much!!
w
read the subject of thread, and don't use LLM to reply
b
Hello Zannax. Thanks for your help. What do you mean with "the subject of thread"?
w
My response is not directed at you but at a scam user who has since deleted his post.
w
hey @better-judge-10532 you can use await actions.openai.generateContent({params})