https://discord.gg/botpress logo
b
hi @loud-crowd-60573 My chatbot works correctly when answering from the knowledge base, but when a question is sent to the AI model (if not found in knowledge base) (ChatGPT 4o mini, previously Gemini Flash), the AI never responds in the frontend even though it works in the emulator. In the issues section I repeatedly see an ‘Unhandled rejection’ error. Please help
l
Hey @busy-journalist-18116what is your workspace ID? I'll take a look
And just to clarify, everything works fine in the emulator but not on webchat for example?
b
yes
and here is is id wkspace_01K69XCV8G64HZ318QDK9T1XH1
w
@busy-journalist-18116 little important distinction - the questions are sent to the LLM either way (if found in the KB or not)
can you try switching models? if the unhandled rejection is from OpenAi
and could you please send a full screenshot from the issues tab
b
i already tried it i was using gemini model then i changed it to chatgpt 4omini, but still 😔
sure
w
sorry i mean can you send a screenshot of the specific issue
open one of the issues
w
what's the content of the text card right after your "Raw Input" capture?
i think the error occurs because the bot is trying to send an empty response which is not allowed by the dialog manager (DM)
so if you have instructions like "if you don't have a response, don't answer anything" probably remove it
it works in the emulator because it doesn't use the dialog manager i suppose
I’ve started seeing this issue only in the last few days.
@wide-umbrella-5226
@loud-crowd-60573
w
no need to tag i'm watching the thread closely
the problem is you output the knowledge agent's answer without any conditionals
so if no answer is found, it outputs empty
which is not allowed
so you can add expression transitions to check if turn.KnowledgeAgent.answer has a length of 1 or more characters
if it does, send the answer
if not, continue normally or say something specific
b
i have already added the expression transitions
w
yes but it's inverted
you send the answer before you check if it exists
you need to check if it exists, and IF it does, send it
b
so what should i do now
w
place the transition after the raw input
b
and i have a question, earlier the bot was working fine with the same node and settings
w
and connect the transition to the text block
well probably some update on the backend
but the fact that it was working before is luck because the workflow is logically problematic
w
your current order is
raw input > answer > expression
it should be
raw input > expression > answer
b
oookk
hey, it worked
thank you very much
are you from botpress team?
w
no problem bro!! feel free to ask if you have any more problems
no haha i just help around
l
Shen does it again 🫶
Shen is part of the elite few BotBassadors who shows love and support for the Botpress community.
3 Views