https://discord.gg/botpress logo
Picture as an answer
# 🤝help
q
Hi everybody, i have been working using botpress for 3 months and i've never found a way to make my bot answering with the pics from the KB , does anyone know if it is supported, or if there is a way to make the bot using the picture from the KB?
g
if youre using autonomous nodes, write an action that parses image urls out of the KB, then instruct the AN to execute it to parse out image urls. if youre using standard node, use the raw kb query answer, then use execute code to parse out image url, and display.
You can even programatically send a carousel to the user (send image from code instead of from image card if youre using standard nodes.
q
thank you, what if i have a pdf or a long text with images, is it still possible or i can only with single images from url?
g
hmm, im not sure how botpress parses raw images in the kb, @loud-crowd-60573 will though
there are workarounds if bp doesnt parse them but its more complicated
as images embedded in pdfs arent as urls
q
okay , thank you ,i'm waitng for him. just to be clear, the problem is that i have a lot of pdf , and they contain a lot of images, so i hope that create an url for all of them is not the only way
l
Will do some digging and get back!
I've seen bots for example have image urls in tables and when the user can see a list of options on a table for "buying houses" it will display them
I'll show you an example
q
okay thank you Ross, i think i'm gonna reply tomorrow , just so you know , my pdf are like manual that say how to use, fix... a machine, there are a lot of images, so its not like showing some houses but still i appreciate the efford you put to help me , it'd be amazing to find a solution
l
So just to clarify you want the KB to search a PDF for images and display them in your bot? Not 100% sure if that is possible.
Will get back on extracting images from a PDF but one work-around as of right now is to manually enter all the images in a table or import a table with all the items + the image addresses.
g
yeah, since that is the case, you maybe can pre process the KB? loop through each page in the kb, and find images encoded in the pdf, each image you find download as bytes, and make a public url, and relace the image bytes in pdf with the public url. but you would need to set up IDE (eg cursor could do it for you fairly quickly)
then once you have done that, use the resulting file as the KB
or yeah ross is right, you could make a table kb with the image as image urls.
you could just screenshot the pics and make them public but that is manual labour
l
Wondering which solution would be faster 😂
Hopefully he does not have 100s of images
g
depends whether we are using claude in cursor or standard vs code ahah
l
True!!!! hahaha
g
claude is my best pal!!
l
We love claude
Our team developed a debugger tool using claude, it works literal miracles.
g
Lol....... overpowered
can we get a claude debugger to work on our studio bots ahah
can deffo do it via ADK insanelu
l
yeah was made using the ADK haha
5 Views