Query Knowledge not execute when WhatsApp message ...
# 🤝help
d
Hi, My workflow not execute the Query Knowledge Bases card when the bot receive an audio WhatsApp message (event.type=='audio'). The results turn.KnowledgeAgent.answer is always empty. See in the screenshot that the Query field is static. I tried store in variable, but it also didn't work. When the bot receive text messages (event.type='text') it works as expected.
f
I believe this is because the Knowledge Agent won't run unless the user has send a text message.
I had a similar issue when using voice with the Webchat integration.
d
Any workaround?
I need this because I transcribe the audio with OpenAI but I can't run the Knowledge Base.
How did you fix it?
f
I let the user type something
d
@fresh-fireman-491 how can I implement this feature? I love botpress, it is an important feature in the my business. I wouldn't want to switch to another solution because of this limitation, which I don't think makes much sense.
What is the internal decision for skipping the knowledge base in an audio message?
f
Ask the user to write their name or email or something like that. This could be done as the first thing in the chat. Then the user would have written something so you can query the KB.
I will send this post to the team so they can inform you about their decision making about your last question
d
What you are saying is that if in this workflow I have a loop, and it sends audio after any text message it has already sent, will the KB be executed?
f
The KB will work as long as the user has sent a message
d
Ok. I will test it.
Thanks
f
Keep me updated and you are very welcome 🙂
d
Hi! I updated the workflow to request the user name at begin and after this the workflow Wait for User Input. I'm storing the user input using a code. But, if the user input a text the KB works, however if the user input is a audio, the KB keeps skipping. This code is a simplified version, but in the final version it will transcript the audio calling a external API.
f
Just to make sure that I got this right. Even though the user sent a message you still can't query the KB? What does it say in the logs? Does it say that you can't query the KB because there hasn't been any user input or does it just say that it couldn't find an answer
d
Right! Even if the user sent a previous text message, I still can't query the KB when he sends an audio message! Follow the log.
f
Hey Based on the logs it looks like you have the disabled the KB on that node or card 🙂
d
No I didn't. When I send a text message, it works.
See the results
f
That is because it has to be in the same conversation
The conversation seems to have ended
Oh
Nvm
Can you see the logs of that conversation?
d
Yes.
The text message log
The first log is the text message and the second log is the audio message.
f
Hmm weird. I have sent this post to the team who can hopefully enlighten us tomorrow
d
Thank you very much!
f
You are very welcome
d
Hi @fresh-fireman-491. Any updates?
f
Unfortunately not yet as the team are very busy but hopefully soon
d
Hi @fresh-fireman-491! Any updates? @bumpy-butcher-41910 can you help about this?
f
Unfortunately not. I will resend it to them incase they missed it
c
Hey @famous-jewelry-85388, do you have any workaround for @dry-diamond-2052 here? thanks
Can we please have your bot ID @dry-diamond-2052 ?
d
cc237983-b7e8-4809-8163-cc227f31b61e
Hello @famous-jewelry-85388 . Can you help?
Hi @crooked-van-25152. The Whatsapp audio feature is very important. I love botpress, but if this feature not works, i will need to user other solution.
My users may have difficulties with writing. I need to provide a more inclusive solution.
f
Hey @dry-diamond-2052 , Have you checked this documentation? https://botpress.com/docs/cloud/channels/whatsapp/#media-images-audio-documents
d
Yes @famous-jewelry-85388 . Today the bot gets audio from payload and I send via code block to my server, execute transcript and returns the text. The problem is the KB for some reason doesnt run after this. For some reason KB is disabling in runtime in the workflow when the message sent is an audio.
f
Understood. is it okay to share with me the bot? A reportID is a copy of the bot
@square-energy-41150 generate reportID
s
# Sending a Problem Report Here's how to send the Botpress Team a problem report: 1. In the Botpress Cloud Studio, locate the "Help" icon in the bottom left corner of the screen. 2. Click "Report a problem" and follow the steps on the screen. 3. Copy the Report ID to your clipboard and provide it to a member of the Botpress Team on Discord.
message has been deleted
f
If it is not suitable, not problem, we can continue here
when it is sent to your server. do you await the response?
and are you sure you recieved it?
d
Hi @famous-jewelry-85388, today the bot is running with restricted behaviour because it. When receive a text message the bot queries the KB in the flow, and works as expected. On the other hand, when the payload type is audio, and the KB doesnt works, the workflow requests directly to OpenAi completion API.
Because this, I was searching a external KB solution as workaround. But I would very happy to use botpress KB is both flow (text and audio).
f
I understand the above. But it depends on how you built your bot. And I need to see it, that will make it easier.
If it is not possible to share a report ID (will give me a copy of the bot), then can you share with him how you are passing the extracted text with the KB?
8 Views