https://discord.gg/botpress logo
How to resolve this issue?
# 🤝help
w
This code is currently displaying the response on the main card, but since it is currently displaying them individually, the response is split into several parts and displayed. How can I display the incoming response on the main card and display it by appending it to the end of the current main card when the response is updated? https://cdn.discordapp.com/attachments/1389924587671650505/1389924588208656455/image.png?ex=686663a5&is=68651225&hm=ed5e39805912984131324a1ea7ca47790a4de74cde2b6229882a5f8ffe6efb91&
r
I think , what you can do is that either stop using multiple cards and modify the code so that it doesn't post a message until the full response is ready and then posts the message in one go
w
I already did like that.
p
Can you show your workflow? And explain what you are trying to achieve?
w
currently my custom backend return response as streaming and i handled using webhook
but when i return response as per each chunk, it display like this.
l
@prehistoric-airplane-85682 i did a call with @wide-gold-10047 , he is using external code to generate responses via an LLM. He is using a for loop to generate chunks and for each chunk calling Botpress API to send the message. Hence each chunk is sending one word responses to Botpress. When we changed the structure to call Botpress after the loop was complete, the code works fine. However, @wide-gold-10047 says it's slow. I believe this is not an issue with Botpress. Since even if we somehow can collect all these messages and display them post all chunks are delivered, I don't believe it will increase speed
p
@limited-pencil-78283 Thanks for the explanation and your help with the issue. Latency is possible when implementing ideas that were specifically vetoed by our team.